-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathInstructor.java
More file actions
68 lines (46 loc) · 1.57 KB
/
Instructor.java
File metadata and controls
68 lines (46 loc) · 1.57 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package students.derwinbell;
import java.util.ArrayList;
public class Instructor extends Person{
private String department;
private Student students;
private final ArrayList<Student> studentArrayList = new ArrayList<>();
public void addStudents(Student students){
studentArrayList.add(students);
}
public Instructor(String id, String firstName, String lastName, String email, String department) {
super(id, firstName, lastName, email);
this.department = department;
}
public ArrayList<Student> getStudentArrayList() {
return studentArrayList;
}
public void setDepartment(String department) {
this.department = department;
}
public void studentList(){
if (studentArrayList.isEmpty()) {
System.out.println("No Customer found.");
return;
}
for (Student s : studentArrayList) {
System.out.println("-" + s.getFirstName() +
" " + s.getLastName() + " | GradeLevel: " + s.getGradeLevel() +
" | GPA: " + s.getGpa());
}
}
@Override
public void getSummary(){
System.out.println("[Instructor] "+ getFirstName() + " " +getLastName()+ " | Department: " +getDepartment());
}
public String getDepartment() {
return department;
}
public void createAnnouncement(String message){
System.out.println("Announcement: " + message);
}
public void listPeople(ArrayList<Student> student){
for (Person p: studentArrayList)
{
}
}
}