Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class NumberDisplay
- {
- private int max;
- private int value;
- public NumberDisplay(int clockMax, int clockValue)
- {
- max = clockMax;
- value = clockValue;
- }
- public int getValue()
- {
- return value;
- }
- public int getMax()
- {
- return max;
- }
- public void forward()
- {
- if(value == max)
- {
- value = 0;
- }
- else
- {
- value++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement