Question: Revise the class TimeBook in Listing 7.14 to use an enumeration for the days of the week instead of named constants. Listing 7.14 Class that

Revise the class TimeBook in Listing 7.14 to use an enumeration for the days of the week instead of named constants.


Listing 7.14

Class that records the t ime worked by each of a company's employees during one five-day week. A sample application is in the main method. */ public class TimeBook { private int number0fEmployees; //hours[i][j] has the hours for //employee j on day i. private int[U] hours; private int[] weekHours; //weekHours

Class that records the t ime worked by each of a company's

employees during one five-day week. A sample application is in the mainmethod. */ public class TimeBook { private int number0fEmployees; //hours[i][j] has the

Class that records the t ime worked by each of a company's employees during one five-day week. A sample application is in the main method. */ public class TimeBook { private int number0fEmployees; //hours[i][j] has the hours for //employee j on day i. private int[U] hours; private int[] weekHours; //weekHours [i] has the week's //hours worked for employee i + 1. private int [] dayHours; //dayHours[i] has the total hours //worked by all employees on day i. private static final int NUMBER_OF_WORKDAYS = 5; private static final int MON = 0; private static final int TUE private static final int WED private static final int THU = 3; private static final int FRI %3D 1: %3D 2; 43B %3!

Step by Step Solution

3.44 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

ANSWER public class TimeBook private int numberOf Employees private int hours hoursij has the hours ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java An Introduction to Problem Solving and Progra Questions!