sysc 2004 assignment 1 alarmclock.txt

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

• Homework Help
• 3
• 100% (2) 2 out of 2 people found this document helpful

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

/** * 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) {

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

This is the end of the preview. Sign up to access the rest of the document.
• Spring '11
• BAILY
• Assignment 1

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern