sysc 2004 assignment 1 alarmclock.txt

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

Info icon 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) {
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern