Created
June 4, 2019 07:30
-
-
Save dnivra26/111172e4bd5e576613472a0b1c29a5c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Clock { | |
public void setTime(); | |
public int getTime(); | |
public void setAlarm(); | |
public void getAlarm(); | |
public void setRadio(); | |
public void getRadio(); | |
} | |
class AlarmClock implements Clock{ | |
@Override | |
public void setTime() { | |
// does not apply | |
} | |
@Override | |
public int getTime() { | |
return 0; | |
} | |
@Override | |
public void setAlarm() { | |
//actual function | |
} | |
@Override | |
public void getAlarm() { | |
// return alarm | |
} | |
@Override | |
public void setRadio() { | |
// does not apply | |
} | |
@Override | |
public void getRadio() { | |
// does not apply | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment