-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOutputTable.java
More file actions
46 lines (39 loc) · 918 Bytes
/
OutputTable.java
File metadata and controls
46 lines (39 loc) · 918 Bytes
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
42
43
44
45
46
import java.util.ArrayList;
public class OutputTable {
static ArrayList<Integer> output_times = new ArrayList<Integer>();
public static void addNewOutputEntry(int time)
{
output_times.add(time);
}
public static void printOutputTable()
{
System.out.println("-----------------------------");
int index=0;
for(Integer curr_time:output_times)
{
System.out.println("Entry number : " + index + " Time : "+ curr_time);
index+=1;
}
System.out.println("-----------------------------");
}
public static void removeFirstEntry()
{
output_times.remove(0);
}
public static Integer getNextOutputTime()
{
return output_times.get(0);
}
public static int getCurrentSize()
{
return output_times.size();
}
/*public static void main(String args[])
{
addNewOutputEntry(50);
addNewOutputEntry(100);
addNewOutputEntry(50000);
addNewOutputEntry(1);
printOutputTable();
}*/
}