-
Notifications
You must be signed in to change notification settings - Fork 1
/
Student.java
44 lines (36 loc) · 1.13 KB
/
Student.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
package main;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
public class Student extends User {
OverloadPerms overloadPerms;
ArrayList<Mark> marks;
public Student () {}
public Student (String id, String password, String fName, String lName, OverloadPerms overloadPerms){
super(id, password, fName, lName);
this.overloadPerms = overloadPerms;
}
public Student (String id, String password, String fName, String lName, OverloadPerms overloadPerms,
ArrayList<Mark> marks) {
super(id, password, fName, lName);
this.overloadPerms = overloadPerms;
this.marks = marks;
}
public static ResultSet listCourses() throws SQLException {
User user = new User();
user = user.getUser();
System.out.println("User id is: " + user.getUserID());
Reader reader = new Reader();
ResultSet offeringList = reader.SearchDB("ASS1_ENROLMENTS", "STUDENT", user.getUserID());
return offeringList;
}
public OverloadPerms getOverloadPerms () {
return overloadPerms;
}
public ArrayList<Mark> getMarks () {
return marks;
}
public void setMarks (ArrayList<Mark> marks) {
this.marks = marks;
}
}