In this exercise, you are required to: 1. create the WorkSheet class that stores the total working hours for each day of

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

In this exercise, you are required to: 1. create the WorkSheet class that stores the total working hours for each day of

Post by answerhappygod »

In This Exercise You Are Required To 1 Create The Worksheet Class That Stores The Total Working Hours For Each Day Of 1
In This Exercise You Are Required To 1 Create The Worksheet Class That Stores The Total Working Hours For Each Day Of 1 (78.57 KiB) Viewed 67 times
In this exercise, you are required to: 1. create the WorkSheet class that stores the total working hours for each day of a month for a restaurant officer in an array of integers, The class should have one field of 2D array of integers: yearWorkHours[12][30] that hold the daily done work hours for 12 months (for simplicity, assure all months have exactly 30 days) WorkSheet class has the following methods: 1. getMonth TotalHours, that takes the month number and returns the total work hours for that month. 2.getAvgDailyHours that returns the average number of hours done by the employee in the given month number. 3.getLowestWorkingDay that returns lowest daily working hours for a given month the lowest number of work hours. 4. getHeighest WorkingDay that returns highest daily working hours for a given month. 5.populateWorkSheet that reads data from the worksheetData.csv file. The file includes information for 12 months 30 days per each year. In case of any failure it should return false otherwise it returns true. 2. In the Mainjava file create an object of WorkSheet then call populateWorksheet to fill the array from the worksheetData.csv file [provided in the files) 3. Make sure to handle cases that have invalid parameters like 0. greater than or negative values. Each method that takes month as parameter must throw InvalidiputExeception when you have any of of the invalid input cases. 4. In Main.java, test the methods 1-4 using simple unit testing format as described in Labiz 5. In the Main.java make sure you add the suitable exception handling blocks i.e., try and catch blocks Bonus: think about printing out the table of each month containing total hours, total earning of the month if 20$ is given per hour, average working hours, the highest, and lowest number of worked hours to a file call it yearreport.txt Work Sheet +year WorkHours: int to + Worksheet + getAvgDailyHours(inty: double +gelionth TotalHoursoint; int + getHighestWorkingDay(int) int + getlowestWorkingDay(int in + populate WorkSheet): boolean
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply