-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCounterModel.java
41 lines (32 loc) · 932 Bytes
/
CounterModel.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
39
40
41
/** This class is the model for the CounterView class. */
public class CounterModel {
/** Staff object that holds all the staff data. */
private Staff staff;
/** Utils for getting random information. */
private final Utils utils;
public CounterModel() {
utils = new Utils();
// Initialization
nextCounter();
}
/** Returns counterNumber. */
public int getCounter() {
return staff.getCounter();
}
/** Returns staffName. */
public String getStaffName() {
return staff.getStaffName();
}
/** Returns staffRole. */
public String getStaffRole() {
return staff.getStaffRole();
}
/** Returns staffID. */
public String getStaffID() {
return staff.getStaffID();
}
/** Gets a new Counter and sets its data in the model. */
public void nextCounter() {
staff = utils.getRandomStaff();
}
}