A person tries to finish a 10000 piece puzzle and wants to know how much time...
Fantastic news! We've Found the answer you've been seeking!
Question:
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 Answer: (penalty regime: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100 %) Reset answer 1 #include<iostream> 2 using namespace std; 3 0 00 - аирш 4 T 8 class Time { 6 7 } int main() 9 10, { 11 12} 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 Answer: (penalty regime: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100 %) Reset answer 1 #include<iostream> 2 using namespace std; 3 0 00 - аирш 4 T 8 class Time { 6 7 } int main() 9 10, { 11 12}
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
How long will it take the bacteria population in Exercise 47 to double? Round the answer to the nearest tenth.
-
How long will it take the water surface in the tank shown to drop from h = 3 m to h = 50 cm? 60 cm diameter h 3 cm diameter V= V2gh
-
How much time will be required to face mill an AISI 1020 steel surface that is 12 in. long and 5 in. wide, using a 6-in. diameter, eight-tooth tungsten carbide inserted-tooth cutter? Select values of...
-
Is an isothermal process necessarily internally reversible? Explain your answer with an example.
-
What are an organization's basic duties under the Occupational Safety and Health Act?
-
What potential consequences can arise from the implementation of a policy wherein a company neglects to account for varying levels of risk when calculating the cost of capital for its diverse...
-
A sphere of radius \(R\) is rotating in an infinite fluid at an angular velocity of \(\Omega\). Derive the following expression for the velocity field: \[v_{\phi}=r \Omega \sin \theta...
-
Hitech Appliance Company's accountant has been reviewing the firm's past television sales. For the past two years, Hitech has been offering an extended service contract on all televisions sold. With...
-
Norsk Optronics, ALS, of Bergen, Norway, had a current ratio of 4 on June 3 0 of the current year. On that date, the company s assets were: Cash $ 6 6 , 0 0 0 Accounts receivable, net 4 0 0 , 0 0 0...
-
Pacifico Company, a U.S.-based Importer of beer and wine, purchased 1,500 cases of Oktoberfest-style beer from a German supplier for 375,000 euros. Relevant U.S. dollar exchange rates for the euro...
-
Give the characteristic of a second order reaction having onlyone reactant. A) The rate of the reaction isnot proportional to the concentration of the reactant. B) The rate of the reaction isdirectly...
-
At what rate do photons emitted by a green-light laser \((\lambda=532 \mathrm{~nm})\) hit a wall \(2.00 \mathrm{~m}\) from the laser if the power rating is \(5.00 \mathrm{~mW}\) ? What assumption...
-
Distributive justice is concerned with how goods are ___________.
-
What is the purpose of computing financial ratios?
-
What information do leverage ratios provide?
-
What is the primary difference between an income statement and a statement of cash flows?
-
ABC Inc. expects to pay $4.40 dividend next year (2021). The current market price of the stock is $40. The dividends are growing at 5% each year. ABC plans to issue some new stocks. They feel that...
-
Refer to Example 9.15. Add the following functionality to this program: Allow the user to enter the cost of a gallon of gas on each trip and use a function, Cost() to calculate the cost of purchasing...
-
A bead, under the influence of gravity, slides along a frictionless wire whose height is given by the function V (x) (see Fig.). Find an expression for the bead??s horizontal acceleration x. (It can...
-
You are in a spaceship sailing along in outer space. Is there any way you can measure your speed without looking outside?
-
It is not necessary to postulate the impossibility of accelerating an object to speed c. It follows as a consequence of the relativistic form of energy. Explain.
-
Show that the Fourier transform of a conjugate antisymmetric sequence is imaginary.
-
Solve Exercise 1.22 using the concept of the transfer function. Exercise 1.22 Compute the inverse Fourier transform of \[X\left(\mathrm{e}^{\mathrm{j} \omega} ight)=\frac{1}{1-\mathrm{e}^{-\mathrm{j}...
-
We define the even and odd parts of a complex sequence \(x(n)\) as \[\mathcal{E}\{x(n)\}=\frac{x(n)+x^{*}(-n)}{2} \quad \text { and } \quad \mathcal{O}\{x(n)\}=\frac{x(n)-x^{*}(-n)}{2}\]...
Study smarter with the SolutionInn App