-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCourse.java
More file actions
47 lines (46 loc) · 1.51 KB
/
Copy pathCourse.java
File metadata and controls
47 lines (46 loc) · 1.51 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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author GOThreads
*/
public class Course {
private String code;
private String name;
private int contactSlots;
private String resourceType;
private String courseType;
private Course association;
public Course(String code, String name, int contactSlots, String resourceType, String courseType){
this.code=code;
this.name=name;
this.contactSlots=contactSlots;
this.resourceType=resourceType;
this.courseType=courseType;
}
public void printAsString(){
System.out.println("Course code: "+this.code);
System.out.println("Course name: "+this.name);
System.out.println("Course slots: "+this.contactSlots);
System.out.println("Course resType: "+this.resourceType);
System.out.println("Course type: "+this.courseType);
if(this.association!=null)
System.out.println("Course association: "+this.association.getCode());
System.out.println("=========================================================");
}
public String getCode(){
return this.code;
}
public int getContactSlots(){
return this.contactSlots;
}
public String getCourseType(){
return this.courseType;
}
public void setAssociation(Course association){
this.association = association;
}
}