project

Please note the following about this project:
1) This is a group project of maximum 3 students per group.
2) The deadline for this project is the last week before the final exam.
3) You need to submit your code (.cpp file) only in the blackboard.
4) This project constitutes 15% of the overall course.
University Database
Assume that you are designing a university’s database which has several colleges and within each college it has several departments. So you need to create a database using linked list that represent a university’s college and department structure.
You should create two classes, one for College and the other for Department.
A College should have at least the following parameters: (Please note that you may add additional parameters of your choice for each college if it helps you in any way)
College Name: string ( for example, Business, Engineering, etc.)
Number of departments: int (this will be the number of department within a college)
departments: Department * (this field is of type Department pointer which points to the object of type Department)
next: College* (this pointer will point to the next college in the list)

A Department should have at least the following parameters: (Please note that you may add additional parameters of your choice in this class if it helps you in any way)
Name of department: string (for example, Computer Science, IT, etc.)
Number of students: int (this will store the number of students in this department)
next: Department* (this pointer will point to the next department in the list)
You should create a pointer, say “PMU”, as the head of the database which points to the first College object in the linked list.
College * PMU = NULL; //this pointer is the head of the linked list. Don’t call it head.
You should provide functions to support the following operations:
1.    Add a new college in the list (take input from user, all the fields and add a new college)
2.    Delete a college from the list (based on college’s name). Notice that deleting a college should delete all the departments of that college as well.
3.    Add a department as in the list of departments of a college. You should ask two things, the name of the college to know which college you should add the department, and the department information to add that department in the list of departments of this particular college.
4.    Delete a department from the list of departments of a college. You should ask department’s name to delete it from the list. First find out which college has this department and then delete this department from that college.
5.    Print all the colleges along with their list of departments in the entire list.
6.    Delete all the departments of a particular college (by college’s name).
7.    Delete all the colleges from the list. This includes deleting all the departments of each college.
8.    Print the total number of students in a college.
9.    Find and print the college that has the highest number of students.
10.    Find and print the department that has the highest number of students.

The following diagram shows how the linked list should look like. Please note about the following diagram of linked list: (Also note that the dotted line arrows in the following diagram are comments)
1)    PMU is the name of the head of the linked list that contains all of your colleges (shown as the first row of list).
2)    Each Node represents a college which contains all the fields mentioned above including:
a) one pointer “next” that points to the next college in the list (shown by an arrow on
the right hand side of each node on the first line).
b) one pointer “departments” (shown by an arrow in the bottom of each node) which
points to the linked list containing the list of departments in this college.
3)    In this diagram, each node only mentions the name of the college. However, it also contains other fields as mentioned above, but that is not shown in the diagram to keep it simple.

These are “next” pointers pointing at object type “college”
PMU

Project Output Screen:
When I run the project, it should look like the following:

Please select any item from the following menu:
1:    Add a new college in the list
2:    Delete a college from the list
3:    Add a department in a college
4:    Delete a department from a college.
5:    Print all the colleges along with their departments
6:    Delete all the departments of a particular college
7:    Delete all the colleges from the list.
8:    Print the total number of students in a college.
9:    Find and print the college that has the highest number of students.
10:    Find and print the department that has the highest number of students.
     (here I will type a number from the above menu)

Now, after I see the above menu, I will make a selection from 1 to 10. Based on my selection, your program should call some function to carry out the operation needed for that selected task.
After that operation is performed, you should show me the above mentioned selection menu again. This should continue in an infinite loop until I want to exit the program.
Finally, remember that you should write a function FillDatabase (…) that should populate the entire database for PMU before you bring your code for assessment on the last day of the semester.
Hope the above-mentioned information is helpful.
Good luck 
Shahab

Leave a Reply

Your email address will not be published. Required fields are marked *