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 04:50
Which are steps taken to diagnose a computer problem? a) reproducing the problem and using error codes b) reproducing the problem and troubleshooting c) using error codes and troubleshooting d) using error codes and stepping functions
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
In deadlock avoidance using banker’s algorithm, what would be the consequence(s) of: (i) a process declaring its maximum need as maximum possible for each resource. in other words, if a resource a has 5 instances, then each process declares its maximum need as 5. (ii) a process declaring its minimum needs as maximum needs. for example, a process may need 2-5 instances of resource a. but it declares its maximum need as 2.
Answers: 3
question
Computers and Technology, 24.06.2019 17:30
Looking at the electroscope, describe how you can cause the two leaves at the bottom to repel each other and stay that way
Answers: 3
question
Computers and Technology, 25.06.2019 08:50
99 points asap ! select the mathematical statement that is true. a.22 % 2 > −3 b.22 % 2 < 5 c.22 % 2 == 4 d.22 % 2 ! = 1 this is for my python coding class you
Answers: 1
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, 03.08.2019 12:30
question
Mathematics, 03.08.2019 12:30
Questions on the website: 13722367