-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathSchoolM.java
More file actions
50 lines (40 loc) · 1.14 KB
/
SchoolM.java
File metadata and controls
50 lines (40 loc) · 1.14 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
package students.mesheikbrown;
public class SchoolM {
public static void main(String[] args) {
// Create Instructor
Instructor instructor = new Instructor(
100,
"Mesheik",
"Brown",
"Mesheik@school.com",
"Computer Science"
);
// Create Students
Student student1 = new Student(
1,
"Jordan",
"Smith",
"jordan@school.com",
2,
3.8
);
Student student2 = new Student(
2,
"Marcus",
"Brown",
"marcus@school.com",
1,
2.9
);
// Add students to instructor roster
instructor.addStudent(student1);
instructor.addStudent(student2);
// Print instructor summary
instructor.getSummary();
System.out.println();
// Print roster
instructor.displayRoster();
// Create announcement
instructor.createAnnouncement("Midterm exam is Friday. Study hard!!");
}
}