Question: (Exercise 1) This exercise is exactly the same as Exercise 1 of Lab 6. Instead of creating a Time structure you will create a Time

 (Exercise 1) This exercise is exactly the same as Exercise 1of Lab 6. Instead of creating a Time structure you will createa Time class. The output from your program should be exactly the

(Exercise 1) This exercise is exactly the same as Exercise 1 of Lab 6. Instead of creating a Time structure you will create a Time class. The output from your program should be exactly the same as the one for Lab 6, but you will be using a class rather than a structure. In order to receive full credit for this part of the lab, you must create two files for your class, a Time.h file with your class declaration and a Time.cpp file with your class definition a main.cpp file for your main, getTimeFromUser, and print24Hour functions. a total of 3 private variables in Time class: hours, minutes, and seconds. a total of 9 public functions in Time class: o Default Constructor (TimeO): initializes the three variables to 0 o Extra Constructor (Time Parameters): takes three parameters and initializes the hours, minutes, and seconds based on them o Destructor (NTimeO): does nothing o 3 "Accessor" functions: each one returns the current value for the hours minutes, and seconds respectively. o 3 "Mutator" functions: each one takes a parameter and sets it as the current value for the hours, minutes, or seconds. Inside the getTimeFromUser function, you no longer can set the hours by typing start time.hours h

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!