-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstructorManager.java
More file actions
91 lines (77 loc) · 2.76 KB
/
Copy pathInstructorManager.java
File metadata and controls
91 lines (77 loc) · 2.76 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
public class InstructorManager
{
public void addCourse(Instructor instructor)
{
System.out.println("\n" + instructor.getCourse() + " are added as course by " +
instructor.getUserType() + " " + instructor.getFirstName() + " " + instructor.getLastName() + ".");
}
public void removeCourse(Instructor instructor)
{
System.out.println("\nCourse " + instructor.getCourse() + " are removed from system by " +
instructor.getUserType() + " " + instructor.getFirstName() + " " + instructor.getLastName() + ".");
}
public void updateCourse(Instructor instructor)
{
System.out.println("\nCourse " + instructor.getCourse() + " are successfully updated by " +
instructor.getUserType() + " " + instructor.getFirstName() + " " + instructor.getLastName() + ".");
}
public void addHomework(Instructor instructor)
{
System.out.println("\n" + instructor.getUserType() + " " + instructor.getFirstName() + " " + instructor.getLastName()
+ " added a homework to system.");
}
public void updateHomework(Instructor instructor)
{
System.out.println("\n" + instructor.getUserType() + " " + instructor.getFirstName() + " " + instructor.getLastName()
+ " updated a homework.");
}
public void removeHomework(Instructor instructor)
{
System.out.println("\n" + instructor.getUserType() + " " + instructor.getFirstName() + " " + instructor.getLastName()
+ " removed a homework from system.");
}
public void getAll(Instructor[] instructors)
{
for (Instructor instructor : instructors)
{
System.out.println("\nInstructor ID: " + instructor.getId() + "\nFirst & Last Name: " +
instructor.getFirstName() + " " + instructor.getLastName() + "\nCourse: " + instructor.getCourse());
}
}
public void add(Instructor instructor)
{
System.out.println("\n" + instructor.getFirstName() + " " + instructor.getLastName() +
" is added to system as " + instructor.getUserType() + ".");
}
public void update(Instructor instructor)
{
System.out.println("\n" + instructor.getUserType() + " " + instructor.getFirstName() + " " + instructor.getLastName() +
" is successfully updated.");
}
public void remove(Instructor instructor)
{
System.out.println("\n" + instructor.getUserType() + " " + instructor.getFirstName() + " " + instructor.getLastName() +
" is removed from system.");
}
public void addMultiple(Instructor[] instructors)
{
for (Instructor instructor : instructors)
{
add(instructor);
}
}
public void updateMultiple(Instructor[] instructors)
{
for (Instructor instructor : instructors)
{
update(instructor);
}
}
public void removeMultiple(Instructor[] instructors)
{
for (Instructor instructor : instructors)
{
remove(instructor);
}
}
}