Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Download: http://solutionzip.com/downloads/task-1-java/
- 1: A GUI that is built with Javax.swing components with:
- a. Two text fields. one has to be labled: income earned (note: must be a positive decimal number in dollars and cents), and the other minutes worked (note: must be a positive decimal number)
- b. A “submit” button that takes user inputs and stores them in a two-dimensional array.
- NOTE: two-dimensional array should store the entered tutoring time and payment for session information for tutor, as shown below.
- Minutes Wages
- 60.0 10.00
- 120.0 40.00
- 90.0 15.00
- c. An “exit” button that ends the application.
- d. A “run report” button that iterates through the two-dimensional array using a nested for-loop to generates a report of:
- 1: Total minutes of tutoring provided.
- 2: Average wage per hour in dollars and cents
- 3:Total earnings in dollars and cents
- 4: Wage analysis, determined based on comparison of average per hour earnings and current minimum wage, using the following logic:
- - if average wages per hour is minimum wage ~ 2.00, then above average
- The “run report” button should Display resulting calculations in GUI text area in the following format:
- ====================================
- Minutes = **** Earnings = **.**
- Minutes = **** Earnings = **.**
- Minutes = **** Earnings = **.**
- …
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Report of your wages to Date:
- Total Minutes spent tutoring: ***.*
- Total Earnings: $**.**
- Average wage per hour:
- Minimum Wage is currently = $7.25 in Louisiana
- Your Average wages per hour are (above average, below average, or average) NOTE: based on above logic
- ====================================
- 2: Use exceptions to handle invalid user entries for the following situations:
- • If minutes entered is less than or equal to zero, throw exception.
- • Tutors should not tutor for longer than 4 hours per day. If minutes entered is greater than 60 × 4 = 240 minutes, throw exception.
- • Tutors must be paid for their tutoring service. If earnings entered is not greater than or equal to zero, throw exception.
- Note: The program should not terminate abruptly if any of these situations are encountered. The application should print a message “Invalid input. Please try again.” and let the user continue using the application.
- 3: Use single-line and multiline comments to explain program flow.
- Download: http://solutionzip.com/downloads/task-1-java/
Advertisement
Add Comment
Please, Sign In to add comment