Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Code/Demostrate student enrolling/dropping in classes, and the notification to the chairperson when an enrollemnt limit is reached. Also demostrate the case when student is

Java Code/Demostrate student enrolling/dropping in classes, and the notification to the chairperson when an enrollemnt limit is reached. Also demostrate the case when student is wait-listed and an opening occurs for that course. We can hard code the data about the semester, course and enrollment limits without having a need for an explicit database.

Use any 2 Creational Pattern ( e.g. Builder, simpleFactory, abstractfactory), any 2 Structural pattern (e.g., decorator, composite, adpater), any 2 from Behavirial Pattern ( observer, Strategy, state).

I have writtewn 4 classes so far ( Department, Course, Faculty, Student). Please help me to finish this project.

Note:

-The Department class represents a department in a university, and contains information about the department's name, programs,courses, and faculty.

-The Course class represents a course offered by a department, and contains information about the course's name, description, syllabus, and faculty.

-The Student class represents a student enrolled in a department, and contains information about the student's name, program, courses, thesis, and advisor.

public class Department {

private String name; private String[] programs; private String[] courses; private String[] faculty;

public Department(String name, String[] programs, String[] courses, String[] faculty) { this.name = name; this.programs = programs; this.courses = courses; this.faculty = faculty; }

public String getName() { return name; }

public void setName(String name) { this.name = name; }

public String[] getPrograms() { return programs; }

public void setPrograms(String[] programs) { this.programs = programs; }

public String[] getCourses() { return courses; }

public void setCourses(String[] courses) { this.courses = courses; }

public String[] getFaculty() { return faculty; }

public void setFaculty(String[] faculty) { this.faculty = faculty; }

public void printPrograms() { for (String program : programs) { System.out.println(program); } }

public void printCourses() { for (String course : courses) { System.out.println(course); } }

public void printFaculty() { for (String fac : faculty) { System.out.println(fac); } } }

public class Course {

private String name; private String description; private String syllabus; private String faculty;

public Course(String name, String description, String syllabus, String faculty) { this.name = name; this.description = description; this.syllabus = syllabus; this.faculty = faculty; }

public String getName() { return name; }

public void setName(String name) { this.name = name; }

public String getDescription() { return description; }

public void setDescription(String description) { this.description = description; }

public String getSyllabus() { return syllabus; }

public void setSyllabus(String syllabus) { this.syllabus = syllabus; }

public String getFaculty() { return faculty; }

public void setFaculty(String faculty) { this.faculty = faculty; }

public String format() { // return formatted output } }

public class Student {

private String name; private String program; private String[] courses; private String thesis; private String advisor;

public Student(String name, String program, String[] courses, String thesis, String advisor) { this.name = name; this.program = program; this.courses = courses; this.thesis = thesis; this.advisor = advisor; }

public String getName() { return name; }

public void setName(String name) { this.name = name; }

public String getProgram() { return program; }

public void setProgram(String program) { this.program = program; }

public String[] getCourses() { return courses; }

public void setCourses(String[] courses) { this.courses = courses; }

public String getThesis() { return thesis; }

public void setThesis(String thesis) { this.thesis = thesis; }

public String getAdvisor() { return advisor; }

public void setAdvisor(String advisor) { this.advisor = advisor; }

public void printCourses() { for (String course : courses) { System.out.println(course); } }

public float gpa() { // return GPA } }

public class Faculty {

private String name; private String[] courses; private String[] students;

public Faculty(String name, String[] courses, String[] students) { this.name = name; this.courses = courses; this.students = students; }

public String getName() { return name; }

public void setName(String name) { this.name = name; }

public String[] getCourses() { return courses; }

public void setCourses(String[] courses) { this.courses = courses; }

public String[] getStudents() { return students; }

public void setStudents(String[] students) { this.students = students; }

public void printCourses() { for (String course : courses) { System.out.println(course); } }

public void printStudents() { for (String student : students) { System.out.println(student); } } }

public class FinalTest {

public static void main(String[] args) { // TODO Auto-generated method stub

}

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analytics for Accounting

Authors: Vernon Richardson

1st edition

1260375196, 9781260375183 , 978-1260375190

More Books

Students also viewed these Programming questions