Homework 4 Csc211.
Due Wednesday February 11 (11:59pm)
Problem 1 (25 Points)
Hand in the following lab questions.
- Lab 3, question 5
- Lab 4, question 2
- Lab 5, question 6
Turn in Instructions
- Zip all the files into one. Call the zip file hw4a.
- Upload the ZIP file to COL. using the link hw4A
- After you upload a file you can click on it to see what you submitted.
- You can upload a file multiple times, each time it will overwrite the previous submission.
Problem 2 (25 Points)
An employee makes $7.25 an hour and time and half for hours over 40. Write a program that inputs the number of hours worked and compute the employees pay.
Assuming you call the input variable hoursWorked
the psuedocode would be
if hoursWorked <= 40 salary = 7.25 * hoursWorked; else salary = 7.25 * 40 + (1.5 * 7.25 * (hoursWorked - 40));You Must use
final
variables when appropriate. For 40 and 7.25.You must name your class
PayDay
See DiceGame2 and SimpleTax for use of final variables.
Turn in Instructions
Upload PayDay.java file to Col using Hw4B link.
Extra Credit
2% applied to your overall percent
After the above program works, include a loop to allow the user to keep adding in input data. After each computation you would ask the user if they want to compute another.
Problem 3 (25 Points)
You can use either the Scanner class or pop-up windows to get the input.
Write a program that prompts the user to input a number. The program should then output the number and a message saying whether the number is positive, negative, or zero.
You must name your class NumberCheck
You will loose points if your class is not named NumberCheck