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 18:30
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
question
Computers and Technology, 22.06.2019 22:50
Which is the best minecraft server? a. mineplex b. worldonecraft c. 9b9t d. 2b2t
Answers: 2
question
Computers and Technology, 23.06.2019 05:20
Which operating system is a version of linux?
Answers: 1
question
Computers and Technology, 23.06.2019 11:20
Http is the protocol that governs communications between web servers and web clients (i.e. browsers). part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. some of the codes and their meanings are listed below: 200, ok (fulfilled)403, forbidden404, not found500, server errorgiven an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
Answers: 2
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, 24.03.2020 21:24
question
Mathematics, 24.03.2020 21:25
question
Biology, 24.03.2020 21:25
question
Mathematics, 24.03.2020 21:25
question
Mathematics, 24.03.2020 21:25
Questions on the website: 13722360