subject

Design a class called NumDays. The class's purpose is to store a value that represents a number of work hours and converts it to a number of days. For example, 8 hours would be converted to 1 day, 12 hours would be converted to 1.5 days, and 18 hours would be converted to 2.25 days. The class should have a constructor that accepts a number of hours, as well as member functions for storing and retrieving the hours and days. The class should also have the following overloaded operators: 1. Addition operator. When two NumDays objects are added together, the overloaded + operator should return the sum of the two objects' hours members.
2. Subtraction operator. When one NumDays object is subtracted from another, the overloaded - operator should return the difference of the two objects' hours members.
3. Prefix and postfix increment operators. These operators should increment the number of hours stored in the object. When incremented, the number of days should be automatically recalculated.
4. Prefix and postfix decrement operators. These operators should decrement the number of hours stored in the object. When decremented, the number Of days should be automatically recalculated.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. what does it indicate when a website displays https instead of http? a. the website is secure. b. there is no secure sockets layer. c. the secure sockets layer is hidden. d. the website is not secure.
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
How much current flows through the alternator brushes? a. 2โ€“5 a b. 25โ€“35 a, depending on the vehicle c. 5โ€“10 a d. 10โ€“15 a
Answers: 2
question
Computers and Technology, 23.06.2019 23:30
What can you prevent issues related to downloading content form the internet
Answers: 1
question
Computers and Technology, 24.06.2019 18:20
7. design a circuit with three inputs (x, y, and z) representing the bits in a binary number, and three outputs (a, b, and c) also representing bits in a binary number. when the input is 1, 2, or 3, the binary output should be one lesser than the input. when the input is 4, 5, or 6, the binary output should be one greater than the input. when the input is 0, the output is 0, and when the input is 7, the output is 7. show your truth table, all computations for simplification, and the final circuit.
Answers: 2
You know the right answer?
Design a class called NumDays. The class's purpose is to store a value that represents a number of w...
Questions
question
Mathematics, 07.04.2021 01:50
question
Mathematics, 07.04.2021 01:50
question
Mathematics, 07.04.2021 01:50
question
Mathematics, 07.04.2021 01:50
Questions on the website: 13722363