wiley_pastebin

lesson 2 clockdisplay 5

Mar 15th, 2019
3,311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1. public class ClockDisplay {
  2.  //...
  3.  
  4.  public void tick(){
  5.   minutes.tick();
  6.   if(minutes.getValue() == 0){
  7.    hours.tick();
  8.   }
  9.  }
  10.  
  11.  public String getTimeDisplay(){
  12.   return hours.getDisplayValue() + separator +  
  13.            minutes.getDisplayValue();
  14.  }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment