-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTime.java
38 lines (32 loc) · 922 Bytes
/
Time.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* Course: 5DV133
* Written by: Thomas Sarlin thsa0043/id15tsn
* @Author Group 15 - 5DV133 vt2016
* @Version 1.0
*/
/**
* Class to create and handle time
* takes in two arguments: after how many time steps requests sends out
* how many time steps the system has
*/
public class Time {
private int noTimeSteps;
public Time() {
noTimeSteps = 0;
}
/**
* To get the current time in the system
* @return The current value of number of steps which has got in the system
*/
public int getTime() {
return this.noTimeSteps;
}
/**
* Increases the value of number of steps by 1
* If number of time steps modulus value of breakpoint is 0 isBreakPoint becomes true
* If number of time steps is equal to value of endpoint isEndPoint becomes true
*/
public void increment() {
this.noTimeSteps++;
}
}