subject

1)Write a class called Time that represents time in the form of hour minute and second where (35) hour takes values between 0 and 23, minute is between 0 and 59 and second is between 0 and 59. The constructor public Time(int hour, int minute, int second ) constructs a new time whose hour, month and second are taken from the parameter. The addSec(int sec), addMinute(int minute) and addHour(int hour) add seconds, minutes and hours respectively to the current hour, minute and second. They work exactly as if seconds, minutes and hours were added to the real like 24 hour clock. For a current time of 23:59:59 addSec(1) would result in 00:00:00. Addsec(6) to current time of 05:45:55 would give 05:46:01. AddSec(65) to current time of 05:45:55 would give 05:47:00. AddSec(910) to current time of 05:45:55 would give 06:01:10. The parameters of addHour, addMinute and addSec can be any number >=0. Values less < 0 should be invalidated and no change made. You cannot "go back in time".

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:20
Consider a byte-addressable computer with 16mb of main memory, a cache capable of storing a total of 64kb of data and block size of 32 bytes. (a) how many bits in the memory address? (b) how many blocks are in the cache? (c) specify the format of the memory address, including names and sizes, when the cache is: 1. direct-mapped 2. 4-way set associative 3. fully associative
Answers: 2
question
Computers and Technology, 23.06.2019 11:00
In the context of the box model, what is the difference between a margin and a padding? a. a padding lies outside a box border, while a margin lies inside it. b. a padding lies inside a box border, while a margin lies outside it. c. a padding can be adjusted independently, while a margin depends on the size of its box. d. a padding depends on the size of its box, while a margin can be adjusted independently.
Answers: 3
question
Computers and Technology, 23.06.2019 17:20
What is the best assassins creed game?
Answers: 2
question
Computers and Technology, 24.06.2019 17:40
Anewly established internet company with 40 employees needs your advice. they are looking for a collaboration tool and have narrowed their choices to gotomeeting, webex, and my web conferences. after reading the information presented in this chapter and other sources, prepare a two- page document ( double spaced) that includes two advantages and two disadvantages of each tool. which one is your final recommendation? why did you choose that tool over the other two?
Answers: 3
You know the right answer?
1)Write a class called Time that represents time in the form of hour minute and second where (35) ho...
Questions
question
Mathematics, 02.07.2020 19:01
Questions on the website: 13722363