Part A
Create a class called Clock. The clock class will have the following attributes and methods.
____________________
Clock
____________________
int hour
int min
int sec
____________________
void setHour(int)
void setMin(int)
void setSec(int)
void DisplayTime()
____________________
Part b
In the main method, create two instance of the clock, IndiaTime and TorontoTime.
Get the input from the use to set the both clock and then display time in both clock.
Set India Time
Set Hour: 6
Set Min: 30
Set Sec: 45
Set Toronto Time
Set Hour: 16
Set Min: 10
Set Sec: 25
Toronto Time - 16:10:25
India Time - 6:30:45
Part C
Add comments to your code. Make sure that your add the following comments
Student ID
Student Name
Description of the program
Inline comments for each line (Very important)
Comments
Post a Comment