Commit 7206aba8 authored by Roham's avatar Roham

first

parent 400b576c
Pipeline #575 canceled with stages
package org.university.core;
import org.university.core.GradStudent;
import org.university.core.Professor;
import org.university.core.Student;
import java.util.ArrayList;
public class Course {
private String name;
private Professor instructor;
private ArrayList<Student> students = new ArrayList<Student>();
private GradStudent teacherAssistance;
public GradStudent getTeacherAssistance() {
return teacherAssistance;
}
public void setTeacherAssistance(GradStudent teacherAssistance) {
this.teacherAssistance = teacherAssistance;
}
public Course(String name, Professor instructor) {
this.name = name;
this.instructor = instructor;
}
public String getName() {
return name;
}
public Professor getInstructor() {
return instructor;
}
public ArrayList<Student> getStudents() {
return students;
}
public void addStudent(Student student){
this.students.add(student);
}
}
package org.university.core;
import java.util.ArrayList;
public class Department {
private String name;
private ArrayList<Course> courses = new ArrayList<Course>();
public Department(String name){
this.name = name;
}
public String getName() {
return name;
}
public ArrayList<Course> getCourses() {
return courses;
}
public void addCourse(Course course){
courses.add(course);
}
}
package org.university.core;
import java.util.ArrayList;
public abstract class Employee extends Person {
protected ArrayList<Statement> bankStatements;
protected String position;
protected double basicIncome;
public Employee(String firstName, String lastName, String id, int joiningYear, Department department, String position, double basicIncome) {
super(firstName, lastName, id, joiningYear, department);
this.position = position;
this.bankStatements = new ArrayList<>();
this.basicIncome = basicIncome;
}
public void addBankStatements(Statement s)
{
this.bankStatements.add(s);
}
public ArrayList<Statement> getBankStatements() {
return bankStatements;
}
public String getPosition() {
return position;
}
public void setBasicIncome(double basicIncome) {
this.basicIncome = basicIncome;
}
public abstract double calCurrentIncome();
public abstract Boolean isPromotable();
}
package org.university.core;
import java.util.ArrayList;
public class GradStudent extends Student {
private ArrayList<Publication> publications;
private Professor advisor;
public GradStudent(String firstName, String lastName, String id, int joiningYear, Department department, ArrayList<Course> courses, Professor advisor) {
super(firstName, lastName, id, joiningYear, department, courses);
this.publications = publications;
this.publications = new ArrayList<Publication>();
this.advisor = advisor;
}
public ArrayList<Publication> getPublications() {
return publications;
}
public void addPublication(Publication publication)
{
this.publications.add(publication);
}
}
package org.university.core;
public class Person {
protected String firstName;
protected String lastName;
protected String id;
protected int joiningYear;
protected Department department;
public Person(String firstName, String lastName, String id, int joiningYear, Department department) {
this.firstName = firstName;
this.lastName = lastName;
this.id = id;
this.joiningYear = joiningYear;
this.department = department;
}
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public String getId() {
return id;
}
public int getJoiningYear() {
return joiningYear;
}
public Department getDepartment() {
return department;
}
}
package org.university.core;
import java.util.ArrayList;
public class Professor extends Employee{
private ArrayList<Course> courses;
private String group;
public Professor(String firstName, String lastName, String id, int joiningYear, Department department, String position, double basicIncome, String group) {
super(firstName, lastName, id, joiningYear, department, position, basicIncome);
this.group = group;
this.courses = new ArrayList<Course>();
}
public double getCurrentIncome()
{
return super.basicIncome;
}
public ArrayList<Course> getCourses()
{
return this.courses;
}
public void addCourse(Course course)
{
this.courses.add(course);
}
public String getGroup() {
return group;
}
public double calCurrentIncome()
{
}
public Boolean isPromotable()
{
}
}
package org.university.core;
public class Publication {
private String title;
private int year;
public Publication(String title, int year) {
this.title = title;
this.year = year;
}
}
package org.university.core;
public class ServiceEmployee extends Employee{
public ServiceEmployee(String firstName, String lastName, String id, int joiningYear, Department department, String position, double basicIncome) {
super(firstName, lastName, id, joiningYear, department, position, basicIncome);
}
public double calCurrentIncome()
{
}
public Boolean isPromotable()
{
}
}
package org.university.core;
public class Statement {
private double amount;
Employee reciever;
public Statement(double amount, Employee reciever) {
this.amount = amount;
this.reciever = reciever;
}
public double getAmount() {
return amount;
}
public Employee getReciever() {
return reciever;
}
public void setAmount(double amount) {
this.amount = amount;
}
public void setReciever(Employee reciever) {
this.reciever = reciever;
}
}
package org.university.core;
import java.util.ArrayList;
public class Student extends Person{
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 courses;
}
public void addCourse( Course course)
{
courses.add(course);
}
}
package org.university.core;
import java.util.ArrayList;
public class UnderGradStudent extends Student{
public UnderGradStudent(String firstName, String lastName, String id, int joiningYear, Department department, ArrayList<Course> courses) {
super(firstName, lastName, id, joiningYear, department, courses);
}
}
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