-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathCourse.java
More file actions
45 lines (36 loc) · 847 Bytes
/
Copy pathCourse.java
File metadata and controls
45 lines (36 loc) · 847 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
import java.io.Serializable;
/**
* @author Lolipop
* @lastUpdate 2019/12/7
*/
public class Course implements Serializable {
private String cname;
private String cid;
private int chour;
Course(String cname, String cid, int chour) {
this.cname = cname;
this.cid = cid;
this.chour = chour;
}
String getCname() {
return this.cname;
}
String getCid() {
return this.cid;
}
String getChour() {
return Integer.toString(this.chour);
}
void setCname(String cname) {
this.cname = cname;
}
void setCid(String cid) {
this.cid = cid;
}
void setChour(int chour) {
this.chour = chour;
}
void display() {
System.out.print("cname: "+this.cname+"\ncid: "+this.cid+"\nchour: "+this.chour+"\n");
}
}