{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

sysc 2004 assignment 1 alarmclock.txt

sysc 2004 assignment 1 alarmclock.txt - An AlarmClock has a...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/** * An AlarmClock has a time and an alarm time. If the alarm is set, it * rings when time is equal to alarm time. * * @author Lynn Marshall * @version Sample Solution Part 3 */ public class AlarmClock { private ClockDisplay12 clock; // the time private Alarm alarmTime; // the alarm /** * An alarm clock defaults to a clock display of midnight * an alarm time of midnight, and no alarm set. */ public AlarmClock() { clock = new ClockDisplay12(); alarmTime = new Alarm(); } /** * We can set the time, the alarm time, and whether the alarm is set. * * @param clockhour The hour portion of the clock time (1-12) * @param clockmin The minutes portion of the clock time (0-59) * @param clockamPm Whether the clock time is "a.m." or "p.m." * @param alarmhour The hour portion of the alarm time (1-12) * @param alarmmin The minutes portion of the alarm time (0-59) * @param alarmamPm Whether the alarm time is "a.m." or "p.m." * @param alarmset Whether or not the alarm is set (boolean) */ public AlarmClock(int clockhour, int clockmin, String clockamPm, int alarmhour, int alarmmin, String alarmamPm, boolean alarmset) {
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}