-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCourse.java
More file actions
45 lines (42 loc) · 778 Bytes
/
Copy pathCourse.java
File metadata and controls
45 lines (42 loc) · 778 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
43
44
45
package Information;
public class Course extends People{
private int num;
private String name;
private String add;
public Course(int number,String name,String add,int stuNo){
setNo(number);
setName(name);
setAdd(add);
setStuNo(stuNo);
}
public int getNo(){
return num;
}
void setNo(int number) {
this.num=number;
}
public String getName(){
return name;
}
void setName(String name) {
this.name = name;
}
public String getAdd(){
return add;
}
void setAdd(String add) {
this.add = add;
}
public int getStuNo(){
return super.stuNo;
}
void setStuNo(int stuNo) {
this.stuNo = stuNo;
}
public void addStuNo(int stuNo) {
super.stuNo = stuNo+1;
}
public void reduceStuNo(int stuNo) {
super.stuNo = stuNo-1;
}
}