Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AMPMClock extends Clock {
- private boolean choice;
- public void setAMPM(boolean itson) {
- this.choice = itson;
- }
- public String toString(){
- if (choice == true) {
- if (wra > 12){
- wra = wra - 12;
- return (zero(wra)+":"+zero(lepta)+":"+zero(defter) + "am");
- }
- else{
- return (zero(wra)+":"+zero(lepta)+":"+zero(defter) + "pm");
- }
- }
- else{
- return zero(wra)+":"+zero(lepta)+":"+zero(defter) ;
- }
- }
- }
Add Comment
Please, Sign In to add comment