A person tries to finish a 10000 piece puzzle and wants to know how much time will it take to finish it in total. "his person keeps track of how much s/he spent on the puzzle in each session, in hours and minutes. n order to calculate the total time, s/he has to build a complete C++ program. n this program, You are given the total number of sessions at first And for each session you are given hours and minutes spent by the user Vrite the definition for a class called Time that has hours and minutes as integer. The class has also the following member void setTime(int, int) to set the specified value in object void displayTime() to display time object Time sum(Time) to sum two time object & return time. For example: Input Result

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter2: Using Data
Section: Chapter Questions
Problem 4E: In this chapter, you learned that although a double and a decimal both hold floating-point numbers,...
icon
Related questions
Question
A person tries to finish a 10000 piece puzzle and wants to know how much time will it take to finish it in total.
This person keeps track of how much s/he spent on the puzzle in each session, in hours and minutes.
In order to calculate the total time, s/he has to build a complete C++ program.
In this program,
You are given the total number of sessions at first
• And for each session you are given hours and minutes spent by the user
Write the definition for a class called Time that has hours and minutes as integer. The class has also the following member functions:
• void setTime(int, int) to set the specified value in object
• void displayTime() to display time object
• Time sum(Time) to sum two time object & return time.
For example:
Input
Result
4 3 30 4 45 1 15 2 25
How many times did you try to do the puzzle: 4
Enter a time, (hour min): 3 30
Time 1 : 3 hours and 30 minutes
Enter a time, (hour min): 4 45
Time 2 : 4 hours and 45 minutes
Enter a time, (hour min): 1 15
Time 3 : 1 hours and 15 minutes
Enter a time, (hour min): 2 25
Time 4 : 2 hours and 25 minutes
Total Time : 11 hours and 55 minutes
Transcribed Image Text:A person tries to finish a 10000 piece puzzle and wants to know how much time will it take to finish it in total. This person keeps track of how much s/he spent on the puzzle in each session, in hours and minutes. In order to calculate the total time, s/he has to build a complete C++ program. In this program, You are given the total number of sessions at first • And for each session you are given hours and minutes spent by the user Write the definition for a class called Time that has hours and minutes as integer. The class has also the following member functions: • void setTime(int, int) to set the specified value in object • void displayTime() to display time object • Time sum(Time) to sum two time object & return time. For example: Input Result 4 3 30 4 45 1 15 2 25 How many times did you try to do the puzzle: 4 Enter a time, (hour min): 3 30 Time 1 : 3 hours and 30 minutes Enter a time, (hour min): 4 45 Time 2 : 4 hours and 45 minutes Enter a time, (hour min): 1 15 Time 3 : 1 hours and 15 minutes Enter a time, (hour min): 2 25 Time 4 : 2 hours and 25 minutes Total Time : 11 hours and 55 minutes
Expert Solution
steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,