akosiraff

Task 1 Java

May 12th, 2013
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/task-1-java/
  3. 1: A GUI that is built with Javax.swing components with:
  4. 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)
  5. b. A “submit” button that takes user inputs and stores them in a two-dimensional array.
  6. NOTE: two-dimensional array should store the entered tutoring time and payment for session information for tutor, as shown below.
  7. Minutes Wages
  8. 60.0 10.00
  9. 120.0 40.00
  10. 90.0 15.00
  11. c. An “exit” button that ends the application.
  12. d. A “run report” button that iterates through the two-dimensional array using a nested for-loop to generates a report of:
  13. 1: Total minutes of tutoring provided.
  14. 2: Average wage per hour in dollars and cents
  15. 3:Total earnings in dollars and cents
  16. 4: Wage analysis, determined based on comparison of average per hour earnings and current minimum wage, using the following logic:
  17. - if average wages per hour is minimum wage ~ 2.00, then above average
  18. The “run report” button should Display resulting calculations in GUI text area in the following format:
  19. ====================================
  20. Minutes = **** Earnings = **.**
  21. Minutes = **** Earnings = **.**
  22. Minutes = **** Earnings = **.**
  23. …
  24. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  25. Report of your wages to Date:
  26. Total Minutes spent tutoring: ***.*
  27. Total Earnings: $**.**
  28. Average wage per hour:
  29. Minimum Wage is currently = $7.25 in Louisiana
  30. Your Average wages per hour are (above average, below average, or average) NOTE: based on above logic
  31. ====================================
  32. 2: Use exceptions to handle invalid user entries for the following situations:
  33. • If minutes entered is less than or equal to zero, throw exception.
  34. • Tutors should not tutor for longer than 4 hours per day. If minutes entered is greater than 60 × 4 = 240 minutes, throw exception.
  35. • Tutors must be paid for their tutoring service. If earnings entered is not greater than or equal to zero, throw exception.
  36. 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.
  37. 3: Use single-line and multiline comments to explain program flow.
  38.  
  39. Download: http://solutionzip.com/downloads/task-1-java/
Advertisement
Add Comment
Please, Sign In to add comment