-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathLauncher.java
More file actions
51 lines (37 loc) · 1.32 KB
/
Launcher.java
File metadata and controls
51 lines (37 loc) · 1.32 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package exam;
import java.util.ArrayList;
public class Launcher {
public static void displayTextNotes(NoteStore store) {
ArrayList<TextNote> TN = store.GetAllTextNotes();
int i = 1;
for (TextNote tn : TN) {
System.out.print("Text Note ");
System.out.print(i);
System.out.println(tn);
i++;
}
}
public static void displayTextAndImageNotes(NoteStore store) {
ArrayList<TextAndImageNote> TI = store.GetAllTextAndImageNotes();
int i = 1;
for (TextAndImageNote ti : TI) {
System.out.print("Text And Image Note ");
System.out.print(i);
System.out.println(ti);
i++;
}
}
public static void main(String[] args) {
TextNote TN1 = new TextNote("Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems.");
TextNote TN2 = new TextNote("few Books to read - Ikigai, How to win friends and influence people");
TextAndImageNote TI1 = new TextAndImageNote("The shopping list on my fridge","//foo/bar/bar1/bar2/imgset1.jpg");
TextAndImageNote TI2 = new TextAndImageNote("The size label of Jack's shirt","//foo/bar/bar1/bar2/imgset2.jpg");
NoteStore store = new NoteStore();
store.StoreNote(TN1);
store.StoreNote(TN2);
store.StoreNote(TI1);
store.StoreNote(TI2);
displayTextNotes(store);
displayTextAndImageNotes(store);
}
}