Create a test driver to test the functionality of your AlarmClock class created in number 3 above.

What will be an ideal response?


```
public class ClockTest
{
/** Test driver to exercise the AlarmClock class */
public static void main(String args[])
{
AlarmClock myClock = new AlarmClock(12, 30, 0, 6, 30, 0);
System.out.println(myClock.toString());
//Change the alarm time
myClock.setAlarmHour(7);
System.out.println(myClock.toString());
//Create another AlarmClock object and test equals
AlarmClock mySecondClock = new AlarmClock();
if(myClock.equals(mySecondClock))
System.out.println("The AlarmClocks are equal!");
else
System.out.println("The AlarmClocks are not equal!");
}
}

```

Computer Science & Information Technology

You might also like to view...

Computers convert data into information using the ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Most new Android devices are shipping with what version of Android?

A. Froyo B. Gingerbread C. KitKat D. Lollipop

Computer Science & Information Technology

If a manager learns that product 1 failed after 15 tests and product 2 failed after only 5, then ________ data could state that product 1 passed three times as many tests as product 2

A) nominal B) ordinal C) interval D) ratio

Computer Science & Information Technology

Labels, text boxes, and buttons that users can manipulate to interact with a program's forms are referred to by what term?

A. controls B. widgets C. elements D. IDEs

Computer Science & Information Technology