-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathMain.java
More file actions
42 lines (23 loc) · 1001 Bytes
/
Main.java
File metadata and controls
42 lines (23 loc) · 1001 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
package students.derwinbell;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
Instructor instructor = new Instructor("Instructor", "Dr", "Smith", "js@gmail.com", "Computer Science");
Student s1 = new Student("Student", "Derwin", "Bell", "djbell@gmail.com", 2, 2.9);
Student s2 = new Student("Student", "James", "Bell", "jbell@gmail.com", 4, 3.9);
ArrayList<Person> people = new ArrayList<>();
Person s3 = new Student("Student", "Dill", "Kris", "jbell@gmail.com", 1, 3.0);
Person instructor2 = new Instructor("Instructor", "Ms", "Law", "js@gmail.com", "Law");
people.add(instructor2);
people.add(s3);
for(Person p: people){
System.out.println();
}
instructor.addStudents(s1);
instructor.addStudents(s2);
instructor.studentList();
s1.getSummary();
s2.getSummary();
instructor.getSummary();
}
}