-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathMain.java
More file actions
48 lines (30 loc) · 1.08 KB
/
Main.java
File metadata and controls
48 lines (30 loc) · 1.08 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
package students.coreyscott;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
Student jordan = new Student(1, "Jordan", "Smith",
"jordan@email.com", 2, 3.8);
Student marcus = new Student(2, "Marcus", "Brown",
"marcus@email.com", 1, 2.9);
Instructor rivera = new Instructor(3, "Dr.", "Rivera",
"rivera@email.com", "Computer Science");
rivera.addStudent(jordan);
rivera.addStudent(marcus);
rivera.printRoster();
System.out.println();
List<Person> people = new ArrayList<>();
people.add(jordan);
people.add(marcus);
people.add(rivera);
for (Person person : people) {
System.out.println(person.getSummary());
}
System.out.println("\n===== SCHOOL DIRECTORY =====");
School school = new School();
school.addStudent(jordan);
school.addStudent(marcus);
school.addInstructor(rivera);
school.printDirectory();
}
}