can u check whats wrong with my project, AlarmClock
hi,
I tried to initialise the constructors and invoke different methods but there are coming lot of syntax errors that it hampers me in proceeding further steps.
Could you please help me in editing the syntax....
/**
* AlarmClock class implements the digital clock display for a
* European-style 24 hour clock.
* It creates two ClockDisplay objects, one for the current time and
* one for the time that the alarm is set to go off.
*
* @author (Tenzin Rangdol)
* Std id no 0603196
*/
public class AlarmClock
{
private ClockDisplay currentTime;
private ClockDisplay alarmTime;
private String timeMode;
private boolean off;
private String ringTone;
private int numberOfRings;
/**
* Constructor for objects of class AlarmClock
*/
public AlarmClock()
{
currentTime = new ClockDisplay();
alarmTime = new ClockDisplay();
timeMode = new timeMode();
off = false;
ringTone = "buzz";
numberOfRings = rings;
}
/**
* return the time modes of the clock
*/
public void settimeMode()
{
if( timeMode = currentTime){
System.out.println(timeMode.get("currentTime"));
}
else {
System.out.println(timeMode.get("alarmTime"));
}
/**
* return ringTone of the alarmClock
*/
public void setRingTone()
{
switch(ringTone){
case 1 : ringToneString = "ring";
break;
case 2 : ringToneString = "pleaseWakeUp";
break;
case 3 : ringToneString = "goodMorning";
break;
case 4 : ringToneString = "niHao";
break;
case 5 : ringToneString = "getReady";
break;
default : ringToneString = "buzz!";
break;
}
/**
* return respective mode of when switch is on and off
*/
public void setAlarmTime()
{
if(currentTime != alarmTime) {
alarmTime = off;
}
else {
alarmTime = on;
}
}
/**
* This method should get called once every minute.
* It makes the current time go one minute forward.
*/
public void currentTimeTick()
{
minutes.increment();
if(minutes.getValue() == 0) { // it just rolled over!
hours.increment();
}
updatedisplay();
if(currentTime == alarmTime) {
system.out.println(ringToneString = "buzz!");
system.out.println(ringToneString = "buzz!");
system.out.println(ringToneString = "buzz!");
}
else{
system.out.println("forward currentTime");
}
}
/**
* This method should get called once every minute and
* it makes the alarm time go one minute forward.
* It would go off later time.
*/
public void alarmTimeTick(int 07:30)
{
minutes.increment();
if(minutes.getValue() == 0 { // it just rolled over!
hours.increment();
}
updatedisplay();
if(currentTime > 07:30) {
system.out.println("alarmOff");
}
}

