Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using java. The RegistrationSystem will hold information (in collections) on university students, faculty, courses, their prerequisites, and course sections. Complete the implementations for the following

Using java.

The RegistrationSystem will hold information (in collections) on university students, faculty, courses, their prerequisites, and course sections. Complete the implementations for the following operations supplied in the RegistrationSystem class:

  1. Constructor: initialize all fields and ensure that the RegistrationSystem object is in a valid initial state.
  2. addStudent : Add student to the student collection. Throw appropriate exceptions.
  3. addFaculty : Add faculty to the faculty collection. Throw appropriate exceptions.
  4. addCourse : Add course to the faculty collection. Throw appropriate exceptions.
  5. addPrerequisite : Add prerequisite to an existing course in the course collection. Throw appropriate exceptions.
  6. addSection : Add a section for an existing course in the course collection. Throw appropriate exceptions

In addition, you will need to implement functionality and add fields in the following classes:

  1. Faculty : Implement the constructor and add the following fields:
    • first name: the first name of the faculty
    • last name: the last name of the faculty
    • suid: the school (i.e. NYU) identification number -- must be unique
    • status: the status of the faculty (see PersonStatus enum)
    • faculty type: the type of faculty (see FacultyType enum)
    • office: includes building (i.e. ENGR) and room number (i.e 000)
    • email: the school (i.e. NYU) email address
  2. Student : Implement the constructor and add the following fields:
    • first name: the first name of the student
    • last name: the last name of the student
    • suid: the school (i.e. NYU) identification number -- must be unique
    • status: the status of the student (see PersonStatus enum)
    • student type: a student can only be assigned a single student type (see StudentType enum)
    • student program: a student can only be assigned to a single program at a point of time, but can switch from one program to another (i.e. when they've graduated from a program (see StudentProgram enum)
    • student year: only relevant for undergraduates (see StudentYear enum)
    • faculty advisor: students are assigned a faculty advisor, but may switch advisors (i.e. faculty leaves or on sabbatical); may not be assigned an advisor for a period of time when first enrolled as a student
    • start term: associated with the quarter and year a student starts a particular program; for example, a single student may start the CERT in RQ17 and then continue the MSCS in FQ18 (see Quarter enum)
    • email: the school (i.e. NYU) email address
  3. Course : Implement the constructor and add the following fields:
    • For example, CPSC 5011: Object-Oriented Concepts
      • subject code: CPSC
      • course number: 5011
      • course name: Object-Oriented Concepts
      • credit number: 3
      • prerequisite(s): CPSC 5003 (can have multiple prerequisites or none)
  4. Section : Implement the constructor and add the following fields:
    • For example, CPSC 5011-02: Object-Oriented Concepts
      • course: CPSC 5011
      • section: 01
      • instructor: SImon Smith
      • quarter/year: WQ21
      • capacity: 30
      • building/room: ZOOM 100

Driver Requirements

Driver.java has been given. Do not make any changes to this file beyond the TODO - the printSystem(RegistrationSystem system) method (though you can create helper method(s) to help print the RegistrationSystem collections).

Sample Output

-- FACULTY LIST -- Faculty: Name=Roshanak Roshandel, SUID=100015, Email=roshanak@nyu.edu, Status=ACTIVE, Type=ASSOCPROF, Office=ENGR 508 Faculty: Name=James Obare, SUID=100012, Email=obarej@nyu.edu, Status=ACTIVE, Type=INSTRUCT, Office=ENGR 502
-- STUDENT LIST -- Student: Name=Katherine Johnson, SUID=100031, Email=katherinejohnson@nyu.edu, Status=ACTIVE, Type=GRAD, Program=MSCS, Term=FQ 2018, Advisor=Aditya Mishra

-- SUBJECT LIST -- Subject: Biology (BIOL) Subject: Chemistry (CHEM)
-- COURSE LIST -- Course: Name=CPSC-2600: Foundations of Computer Science, Credits=5, Prerequisites=[Name=CPSC-1430: Programming and Problem Solving II] 
-- SECTION LIST -- Section: Course=CPSC-6000-02: Data Structures, Faculty=Adele Singer, Term=FQ 2018, Capacity=30, Room=SING 207

Implement the constructor and add the designated fields for the Course and Section classes. Additional classes and public functionality are acceptable. Be sure to justify any design decisions in your Report. (10 marks)

Implement Person classes

Implement the constructor and add the designated fields for the Student and Faculty classes. Additional classes and public functionality are acceptable. Be sure to justify any design decisions in your Report. (20 marks)

Implement RegistrationSystem class

Complete the implementations for constructor and addStudent, addFaculty, addCourse, addPrerequisite, addSection methods in the RegistrationSystem class. Throw appropriate exceptions. (45 marks)

Driver excerpt:

public class Driver {

public static void main(String[] args) { RegistrationSystem system = new RegistrationSystem(null,null,null); populateSystem(system); printSystem(system);

private static void populateStudents(RegistrationSystem system) throws DuplicatePersonException { system.addStudent("Michael", "Bluth", StudentType.UNDERGRAD, StudentProgram.BSCS, Quarter.FQ, 2018);

}

private static void populateCourses(RegistrationSystem system) throws DuplicateCourseException { system.addCourse(SubjectCode.CPSC, 1420, "Programming and Problem Solving I", 5); }

RegistrationSystem.java excerpt

public void addStudent(String firstName, String lastName, StudentType type, StudentProgram program, Quarter quarter, int year) throws DuplicatePersonException { // TODO: implement addStudent method }

public void addPrerequisite(SubjectCode code, int courseNumber,SubjectCode prereqCode,int prereqNumber) throws CourseNotFoundException { // TODO: implement addPrerequisite method }

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 Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago