Menu

[Solved]1 Write Program Called Problem1cpp Includes Design Implementation Time Class Used Represen Q37201313

Using c++1. Write a program called problem1.cpp that includes the design and implementation of a Time class that is used to represent

1. Write a program called problem1.cpp that includes the design and implementation of a Time class that is used to represent and manipulate time objects. A given time is defined by the hour, minute and second. Your class should be able to construct a time object with a user-input values, but not allow the users to change the time except through two methods: nextSecond → This method should advance the time stored in your object by one second addTime This method should take another time object and add it to your current time a. b. Your class should also allow the user to print the current time in the following format “hh:mm:ss”. Your implementation should also include a main program that test the functionality of your class (creates a time object based on the user input, advances it to the next second and print it, then add another time object to it and print the resulting time). (25 points) Show transcribed image text 1. Write a program called problem1.cpp that includes the design and implementation of a Time class that is used to represent and manipulate time objects. A given time is defined by the hour, minute and second. Your class should be able to construct a time object with a user-input values, but not allow the users to change the time except through two methods: nextSecond → This method should advance the time stored in your object by one second addTime This method should take another time object and add it to your current time a. b. Your class should also allow the user to print the current time in the following format “hh:mm:ss”. Your implementation should also include a main program that test the functionality of your class (creates a time object based on the user input, advances it to the next second and print it, then add another time object to it and print the resulting time). (25 points)

Expert Answer


Answer to 1. Write a program called problem1.cpp that includes the design and implementation of a Time class that is used to repre… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *