Question: Written in JAVA with comments, Create a parent class named Time with at least 3 private members of int date type: hour, minute, and second.

Written in JAVA with comments, Create a parent class named Time with at least 3 private members of int date type: hour, minute, and second. You should use the calendar to setup its hour, minutes, and second.

Create a test class to printout your current hour, minute, and second.

Create a child CourseTime with six private members, int lengthOfOS, int OSStartHour, int lengthOfSecurity, int SecurityStartHour, int lengthOfForensics, int ForensicsStartHour, and 6 public get/set methods to manipulate them. The length of each course could be in hour. ####For example, OSs course time is 14:00 - 16:00 in 24 hour format, the value of lengthOfOS is 2 while OSStartHour is 14.

Printout the class time for each of the three courses(e.g., os, security, forenscis) in the test class.

####For example, the output of OS courses should be: OS begins at 14:00. And runs for 2 hours

Then, you need to write a method in the CourseTime class to determine if current time is course time and determine which Course (os, security, forenscis) you should be in. Printout the results to see which class you should be in right now.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!