-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainTest.java
More file actions
26 lines (24 loc) · 1.02 KB
/
MainTest.java
File metadata and controls
26 lines (24 loc) · 1.02 KB
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
import java.util.HashMap;
public class MainTest {
public static void main(String[] args) {
ListInfo l1 = new ListInfo(null, null, 2018, 2, 20, 0, false, null);
ListInfo l2 = new ListInfo(null, null, 2016, 2, 20, 0, false, null);
ListInfo l3 = new ListInfo(null, null, 2016, 2, 21, 0, false, null);
Organize o1 = new Organize(l1);
o1.printInfo();
o1.addOrganize(l2);
o1.printInfo();
o1.addOrganize(l3);
o1.printInfo();
String[] months = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
HashMap<String, Integer> monthNum = new HashMap<String, Integer>();
for (int i = 1; i < 13; i++) {
monthNum.put(months[i-1], i);
}
int monthNumSelected = monthNum.get("January");
System.out.println(monthNumSelected);
System.out.println(o1.getList().size());
o1.clearList();
System.out.println(o1.getList().size());
}
}