-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStaircase.java
37 lines (37 loc) · 888 Bytes
/
Staircase.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
package TRAFFICSIM;
class Staircase {
private int bottomX, bottomY, topX, topY;
private String building;
private int studentCounter = 0;
public Staircase(int bottomX, int bottomY, int topX, int topY, String building) {
this.bottomX = bottomX;
this.bottomY = bottomY;
this.topX = topX;
this.topY = topY;
this.building = building;
}
public int getBottomX() {
return bottomX;
}
public int getBottomY() {
return bottomY;
}
public int getTopX() {
return topX;
}
public int getTopY() {
return topY;
}
public String getBuilding() {
return building;
}
public void resetCounter() {
studentCounter = 0;
}
public void increment() {
studentCounter++;
}
public int getStudentCounter() {
return studentCounter;
}
}