-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPGR.java
69 lines (60 loc) · 1.59 KB
/
PGR.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package com.B5015845.CSC8002.Coursework;
import java.util.Date;
/**
* The PGR class creates extends AbstractStudent, and stores and retrieves information about UG students. It implements Student and
* ResearchStudent interfaces. PGR students can only be created within the package, but cannot be added to the system through this class.
* @author Arianna Esposito
*/
public final class PGR extends AbstractStudent implements ResearchStudent {
private Supervisor supervisor;
/**
* Package private constructor, which can be accessed within the package (for example by the student factory), but means that
* PGR cannot be created outside of of the package. Inherits constructor from superclass (AbstractStudent). Even if PGR can be created
* elsewhere in the package, it is only added to the system through the student factory method.
* @param name
* @param dob
* @param supervisor
*/
PGR(Name name, Date dob, Supervisor supervisor)
{
super(name, dob);
this.supervisor = supervisor;
}
/**
* @return student type: PGR.
*/
@Override
public StudentType getStudentType()
{
return StudentType.PGR;
}
/**
* @return required credits: 0.
*/
@Override
public int getRequiredCredits()
{
return 0;
}
/**
* @return supervisor.
*/
public Supervisor getSupervisorName()
{
return supervisor;
}
/**
* Set supervisor for PGR
*/
public void setSupervisorName(Supervisor s)
{
this.supervisor = s;
}
/**
* @return pass mark: 0
*/
@Override
public int getPassMark() {
return 0;
}
}