AlarmClock - clock is in-public String room return"Bedroom" Sets the alarm time of the alarm clock-public void setAlarm(String aTime

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // AlarmClock.java Author: Lewis/Loftus // // Represents a generic alarm clock. //******************************************************************** / public class AlarmClock extends Clock { protected String alarmTime; p //---------------------------------------------------------------- // Sets up an alarm clock with the specified information. //---------------------------------------------------------------- public AlarmClock (String eManufacturer, double ePrice, double eWeight, String time, String aTime) { super (eManufacturer, ePrice, eWeight, time); s alarmTime = aTime; } //---------------------------------------------------------------- // Returns information about the room of the house the wall
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // clock is in. //----------------------------------------------------------------public String room() { return "Bedroom"; } //----------------------------------------------------------------// Sets the alarm time of the alarm clock. //----------------------------------------------------------------public void setAlarm(String aTime) { alarmTime = aTime; } //----------------------------------------------------------------// Returns information about this wall clock as a string. //----------------------------------------------------------------public String toString() { String result = super.toString(); S result += "\nAlarm Time: " + alarmTime + "\n"; r return result; } }...
View Full Document

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Ask a homework question - tutors are online