Suppose you are given a list of students registered in a course and you are required to
Question:
Suppose you are given a list of students registered in a course and you are required to implement an array-based student list. Each student in the list has name, regNo, department and cGpa. Implement different functions for entering the data (like constructor (for setting to default values), setName, setReg, etc.). You also need to implement the following function related to the array.
insertStudent( ) : It has 2 options
· Asking the user for index and then insert the student at that index
AND
· Asking the user for name of the student where the new student is to be added (New student should be added at the index of the student whose name is entered)
o If the list is full, it should create a larger list (new size should be entered by the user), copy all the data in it and make insertion as instructed
o (Insertion will only be made if the reg of the new student doesn’t exist in the list)
deleteStudent( ): Same as insertStudent( ) (either by asking the index or student name)
sort( ): Ask the user to input his choice of sorting. Sorting can be based on
· Cgpa
· Name
· Reg#
· Department
Try to use all the concepts that you have learned during OOP like operating overloading, polymorphism etc.
Database management systems
ISBN: 978-0072465631
3rd edition
Authors: Raghu Ramakrishan, Johannes Gehrke, Scott Selikoff