Write a program that implements a small university The unive

Write a program that implements a small university. The university has the following components: Department, Student, Faculty, and Course. The property of each component is outlined as follows:

Department:

-id (long)

-name (string)

-location (string)

-chairId (long)

-nextDepartId (static long)

Course:

-CRN (long)

-maxAvaliableSeats (integer)

-name (string)

-departId (long)

-assignedSeats (long)

-isTaughtBy (long)

-nextCRN (static long)

Student:

-id (long)

-name (string)

-email (string)

-address (string)

-dateOfBirth (string)

-gender (string)

-yearOfStudy (integer)

-major (string)

-advisorId (long)

-coursesTaken (vector of courses taken by a student)

-nextStId (static long)

Faculty:

-id (long)

-name (string)

-email (string)

-address (string)

-dateOfBirth (string)

-gender (string)

-salary (float)

-yearOfExp (intger)

-departId (long)

nextFacultyId (static long) // initialize it to 600

Each of the above components becomes a class of its own. You can provide set() and get() functions in order to assign values or retrieve the values of the attributes. Further, each class should have constant print method that simply prints the values of the attributes on the screen.

The pseudo code for the University class is provided. Print that and use that class in your program.

Your main program is written for you. It calls a method in the University class to read a transaction file and process its commands. The transaction file contains several commands and values. The commands and their formats are:

CreateNewDepartment            depName         depLoc            depChairId

RemoveADepartment              depId

CreateNewStudent                  Name               Email               Address           DateOfBirth

                                                Gender            YearOfStudy   Major              AdvisorId

RemoveAStudent                    StId

CreateNewCourse                   Name               DepId              TaughtBy        MaxSeat

RemoveACourse                     CRN

CreateNewFaculty                   Name               Email               Address           DateOfBirth

                                                Gender            Salary              YearOfExp      DepId

RemoveAFaculty                    FactId

ListCoursesTaughtByFaculty                        facultyId

ListCoursesTakenByStudent                           studentId

ListFacultiesInDepartment                              departId

ListStudentsOfAFaculty                                 facultyId

ListCoursesOfADepartment                           departId

AddACourseForAStudent                              courseId                      stId

DropACourseForAStudent                             courseId                      stId

AssignDepartmentChair                                  facultyId                      departId

AssignInstructorToCourse                              facultyId                      courseId

ListDepartments

ListStudents

ListCourses

ListFaculties

As you see there are 17 different commands. Some commands come with other parameters. For example, if your program detects the command “CreateNewDepartment”, you should expect three values associated with depName, depLoc, and    depChairId. Similary if your program detects the command “CreateNewFaculty”, you should expect 8 values associated with this command: Name, Email, Address, DateOfBirth, Gender, Salary, YearOfExp, and DepId.

Do the following:

-Run your program against the provided transaction file

-Make sure to break up your classes into .cpp and .h files

-All of your classes must have at least one constructor

-There is a lot of common attributes between faculty and students, create a new super class (parent class) to place the common attributes in there and make the Student class and Faculty class to inherit the attributes of that super class

Solution

public class Student { public static void main(String[] args) { int i, q, z, c, b; int x=0; String[] name = new String[30]; int[] age = new int[30]; String[] course = new String[30]; String[] year = new String[30]; String[] section = new String[30]; int menuChoice; Scanner input = new Scanner (System.in); start: do{ System.out.println(\"\\t\\t\\tStudent Record Menu\"); System.out.println(\"\\t\\t1. Add Student\\t2. View Students\\t3. Search Student\\t4. Exit\"); System.out.println(\"Enter a choice: \"); menuChoice = input.nextInt(); if (menuChoice==1) { for (z=x; z<=29; z++) { System.out.println(\"Full name:\"); name [z] = input.nextLine(); System.out.println(\"Age:\"); age [z] = input.nextInt(); System.out.println(\"Course:\"); course [z] = input.next(); System.out.println(\"Year:\"); year [z] = input.next(); System.out.println(\"Section:\"); section [z] = input.next(); x++; continue start; } } else if (menuChoice==2) { for (i=0; i
Write a program that implements a small university. The university has the following components: Department, Student, Faculty, and Course. The property of each
Write a program that implements a small university. The university has the following components: Department, Student, Faculty, and Course. The property of each
Write a program that implements a small university. The university has the following components: Department, Student, Faculty, and Course. The property of each

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site