Question
C++ Object Oriented Programming. Could you help me create the functions for adding a student? Once I see one of the 4 classes done I
C++ Object Oriented Programming.
Could you help me create the functions for adding a student? Once I see one of the 4 classes done I will be able to get the functions for the rest of them.
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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started