Course Solutions Uncategorized (Solved) : Java Question Write Java Class Called Mytime Represents 24 Hour Clock E Ranges 00 00 00 23 Q31374325 . . . .

(Solved) : Java Question Write Java Class Called Mytime Represents 24 Hour Clock E Ranges 00 00 00 23 Q31374325 . . . .

 

Java Question:

Write a Java class called MyTime thatrepresents a 24 hour clock (i.e. ranges from 00:00:00 to 23:59:59).It should have private integer instance variables for hour, minute,and second, and should have the following public methods:

public void setTime(int hour, int minute, intsecond) – this method will set the object’s instance variables tothe specified 24 hour time.. It must first test itsparameter values for a valid time being supplied by the callingcode, according to the following rules:,

Hour must be in the range of 0 to 23.

Minute and second must be in the range of 0 to 59.

If any of the parameters are

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post