-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCourse.java
More file actions
40 lines (31 loc) · 955 Bytes
/
Course.java
File metadata and controls
40 lines (31 loc) · 955 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
package factory_imp;
public abstract class Course {
protected String name;
protected String teacher;
protected boolean needComputer;
protected String formate = "%s told us to do %s homework. Computer is required %b.";
public Course(String name, String teacher, boolean needComputer) {
this.name = name;
this.teacher = teacher;
this.needComputer = needComputer;
}
public abstract void startHomework();
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTeacher() {
return teacher;
}
public void setTeacher(String teacher) {
this.teacher = teacher;
}
public boolean isNeedComputer() {
return needComputer;
}
public void setNeedComputer(boolean needComputer) {
this.needComputer = needComputer;
}
}