Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/model/GraduateStudent.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
public class GraduateStudent extends Student {
private String supervisor;
private String thesisTitle;

@Override
public void getStudentDetails() {
// TODO: Implement method 'getStudentDetails' for GraduateStudent.
throw new UnsupportedOperationException("Unimplemented method 'getStudentDetails'");
}

public GraduateStudent(String studentId,String firstName,String lastName,String major,String supervisor,String thesisTitle)
{
super(studentId, firstName, lastName, major);
this.supervisor=supervisor;
this.thesisTitle=thesisTitle;
}
}
33 changes: 18 additions & 15 deletions src/model/Loan.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,26 @@ public class Loan {
private Date loanDate;
private Date dueDate;

public void getBook() {
// TODO: Implement method 'getBook'.
throw new UnsupportedOperationException("Unimplemented method 'getBook'");
}

public void getStudent() {
// TODO: Implement method 'getStudent'.
throw new UnsupportedOperationException("Unimplemented method 'getStudent'");
}

public void getLoanDate() {
// TODO: Implement method 'getLoanDate'.
throw new UnsupportedOperationException("Unimplemented method 'getLoanDate'");
public Loan(Book book,Student student,Date loanDate,Date dueDate){
this.book=book;
this.student=student;
this.loanDate=loanDate;
this.dueDate=dueDate;
}

public void getDueDate() {
// TODO: Implement method 'getDueDate'.
throw new UnsupportedOperationException("Unimplemented method 'getDueDate'");
}


//Seterr
public void setBook (Book book) {this.book=book;}
public void setStudent (Student student) {this.student=student;}
public void setLoanDate (Date loanDate) {this.loanDate=loanDate;}
public void setDueDate (Date dueDate) {this.dueDate=dueDate;}
//getter
public Book getBook() {return this.book;}
public Student getStudent() {return this.student;}
public Date getLoanDate() {return this.loanDate;}
public Date getDueDate() {return this.dueDate;}

}
18 changes: 12 additions & 6 deletions src/model/Student.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package model;

public abstract class Student {
private String studentId;
private String firstName;
private String lastName;
private String major;

public abstract void getStudentDetails();
protected String studentId;
protected String firstName;
protected String lastName;
protected String major;
public Student(String studentId,String firstName,String lastName,String major)
{
this.studentId=studentId;
this.firstName=firstName;
this.lastName=lastName;
this.major=major;
}
public abstract void getStudentDetails();
}
7 changes: 7 additions & 0 deletions src/model/UndergraduateStudent.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ public void getStudentDetails() {
// TODO: Implement method 'getStudentDetails' for UndergraduateStudent.
throw new UnsupportedOperationException("Unimplemented method 'getStudentDetails'");
}

public UndergraduateStudent(String studentId,String firstName,String lastName,String major,int enrollmentYear)
{
super(studentId,firstName,lastName,major);
this.enrollmentYear=enrollmentYear;
}

}