_*A class called HWTime has been designed to hold details of time . The method signature have been designed :*_
{code}
//constructor intialiazs to midnight (00:00)
Public HWTime ()
//constructor intialises time to hours and minutes provided
Public HWTime (int hours , int mins)
//the String is supplied in the formal hh:mm
//eg 09:30,23:07
Public setTime24(String time)
//returns the time in minutes since midnight
//eg.g 09:30 => 9 *60 + 30 = 570
Public int getTimeInMin()
//returns the time as string in the format hh:mm
//eg .09:30,23:07
Public int getTime24()
//_The Question_
//// a) explain how Junit can be used to create a set of test for this class
///My Answer
public boolean equals(Object otherObject) {
MyTime otherDate = (MyTime) otherObject;
if ( (this.hours == othertime.hours)
&& (this.mins == otherDate.mins))
return true;
else
return false;
}
/////b) Write Junit Test For this Method
{code}
plz help me to answer this question