Commit 5299d92f authored by 9731087's avatar 9731087

third commit

parent 029882be
Pipeline #590 canceled with stages
File added
import org.university.core.Course;
import org.university.core.Department;
import org.university.core.Student;
import java.util.ArrayList;
public class Bachler extends Student {
public Bachler(String firstName, String lastName, String ID, int joiningYear, Department department, ArrayList<Course> courses) {
super(firstName, lastName, ID, joiningYear, department, courses);
}
}
public class Course {
private String title;
private String description;
public String getTitle() {
return title;
}
public String getDescription() {
return description;
}
}
import java.util.ArrayList;
public class Master {
private ArrayList<Essay> essays;
public ArrayList<Essay> getEssays() {
return essays;
}
}
public class ServiceEmployee {
public int incomeCalculate(){
}
}
import java.util.ArrayList;
public class Student {
protected ArrayList<Course> courses;
public ArrayList<Course> getCourses() {
return courses;
}
}
package org.university.core;
import java.util.ArrayList;
public class AbstarctEmployee {
public abstract class AbstarctEmployee extends Person {
protected ArrayList<Payroll> payrolls;
protected int defPay;
protected int income;
public AbstarctEmployee(String firstName, String lastName, String ID, int joiningYear, Department department, int defPay, ArrayList<Payroll> payrolls) {
super(firstName, lastName, ID, joiningYear, department);
this.defPay = defPay;
this.payrolls = payrolls;
}
public ArrayList<Payroll> getPayrolls() {
return this.payrolls;
......@@ -15,7 +22,7 @@ public class AbstarctEmployee {
return defPay;
}
public int incomeCalculate(){
abstract public int incomeCalculate();
}
abstract public boolean isPromoteable ();
}
package org.university.core;
import java.util.ArrayList;
public class Course {
private String title;
private Teacher instructor;
private ArrayList<Student> students = new ArrayList<Student>();
private Master teacherAssistance;
public Course(String name, Teacher instructor) {
this.title = name;
this.instructor = instructor;
}
public String getTitle() {
return this.title;
}
public Master getTeacherAssistance() {
return this.teacherAssistance;
}
public void setTeacherAssistance(Master teacherAssistance) {
this.teacherAssistance = teacherAssistance;
}
public Teacher getInstructor() {
return this.instructor;
}
public ArrayList<Student> getStudents() {
return this.students;
}
public void addStudent(Student student) {
this.students.add(student);
}
}
package org.university.core;
import java.util.ArrayList;
public class Department {
......@@ -5,6 +7,10 @@ public class Department {
private ArrayList<Course> courses;
private String name;
public Department(String name) {
this.name = name;
}
public String getName() {
return name;
}
......@@ -12,4 +18,9 @@ public class Department {
public ArrayList<Course> getCourses() {
return courses;
}
public void addCourse(Course course) {
courses.add(course);
}
}
package org.university.core;
public class Essay {
private String title;
......
package org.university.core;
public class Main {
public static void main(String[] args) {
......
package org.university.core;
import java.util.ArrayList;
public class Master extends Student {
private ArrayList<Essay> essays;
public Master(String firstName, String lastName, String ID, int joiningYear, Department department, ArrayList<Course> courses, ArrayList<Essay> essays) {
super(firstName, lastName, ID, joiningYear, department, courses);
this.essays = essays;
}
public ArrayList<Essay> getEssays() {
return essays;
}
}
package org.university.core;
public class Payroll {
private int id;
......
package org.university.core;
public class Person {
protected String firstName;
......
package org.university.core;
import java.util.ArrayList;
public class ServiceEmployee extends AbstarctEmployee {
public ServiceEmployee(String firstName, String lastName, String ID, int joiningYear, Department department, int defPay, ArrayList<Payroll> payrolls) {
super(firstName, lastName, ID, joiningYear, department, defPay, payrolls);
}
public int incomeCalculate() {
}
@Override
public boolean isPromoteable() {
return false;
}
}
package org.university.core;
import java.util.ArrayList;
public class Student extends Person {
protected ArrayList<Course> courses;
public Student(String firstName, String lastName, String ID, int joiningYear, Department department, ArrayList<Course> courses) {
super(firstName, lastName, ID, joiningYear, department);
this.courses = courses;
}
public ArrayList<Course> getCourses() {
return this.courses;
}
}
package org.university.core;
import java.util.ArrayList;
public class Teacher {
public class Teacher extends AbstarctEmployee {
private ArrayList<Course> courses;
public Teacher(String firstName, String lastName, String ID, int joiningYear, Department department, int defPay, ArrayList<Payroll> payrolls, ArrayList<Course>courses) {
super(firstName, lastName, ID, joiningYear, department, defPay, payrolls);
this.courses = courses;
}
private void addCourse(Course course) {
this.courses.add(course);
}
private void removeCourse(Course course){
this.courses.remove(course);
}
public int incomeCalculate(){
}
@Override
public boolean isPromoteable() {
return false;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment