-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTeach.java
40 lines (36 loc) · 878 Bytes
/
Teach.java
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
public class Teach {
String instructor;
String subject;
String tutNum;
String groupName;
int type;
int groupNum;
int firstYear;
int hall;
int slot;
public Teach( int type, String instructor, int groupNum, String tutNum, String groupName, int firstYear, String subject, int hall, int slot ) {
this.type = type;
this.instructor = instructor;
this.groupNum = groupNum;
this.tutNum = tutNum;
this.groupName = groupName;
this.firstYear = firstYear;
this.subject = subject;
this.hall = hall;
this.slot = slot;
}
public String toString() {
String fact = "teach(";
fact += type + ",";
fact += "'" + instructor + "',";
fact += groupNum + ",";
fact += tutNum + ",";
fact += "'" + groupName + "',";
fact += firstYear + ",";
fact += "'" + subject + "',";
fact += hall + ",";
fact += slot;
fact += ").\n";
return fact;
}
}