OOP for Computer Science Assignment Specification
A small village infant school wishes to computerise its pupil records and you are to write a menu-driven application for this in C++. The data relating to pupils will be held in computer data files, of course (in alphabetical order on surname + first name(s)), but the application (upon being activated) will read the data from the files and store it in an array of the (object-orientated) class Form. Within the data members of this class, there will be an array of objects of class Pupil. The structures of classes Form and Pupil are to be produced by you and must incorporate all the data members, method members and constructors required to satisfy the needs of the application, details of which are given below. In addition, there may be one or two methods not required by this program that might be expected to be included for other programs using these classes. For each method, an argument list (possibly empty) and return type must be shown; for each constructor, an argument list (possibly empty) must be shown.
Within the school, there are just 3 (school) classes, one for each year. These classes are numbered 1-3, in ascending order of pupils' ages. Each school class can contain up to 15 pupils, but your disc files will contain just 4 or 5 pupilsper class (of mixed sexes, for each class), for demonstration purposes. The number of pupils per class will need to be stored (and updated, as pupils enter or leave the class), but no record of the number of girls or the number of boys will be kept. For convenience, each pupil's subjects will be numbered 1-5, with the pupil's latest marks (percentages) for these subjects being held in the corresponding positions (0-4) of an array.
When your application starts up, it will populate the arrays with the names and other data for the pupils from the disc file(s).It will then display a menu with the options shown below. Note that options 1-7 cover the basics and completing these successfully (assuming that you have a good design) will allow you to achieve a mark of up to 75%. If you wish to get a higher mark, then you should attempt some or all of options 8-11. When searching for a pupil, assume that all names are unique and that the full (alphabetically-ordered) name is retrievable (if the name exists).
1. Add pupil to specified class.
2. Remove pupil from specified class.
3. Find no. of pupils in specified class.
4. Display class list for specified class.
5. Find latest mark for given pupil in given subject.
6. Display full address for specified pupil.
7. Display pupils and marks for a given class.
8. Find pupil with highest mark in specified subject.
9. Find oldest pupil in a class.
10. Find number of pupils of specified sex in a given class.
11. Sort pupils into descending order of mark in a class.
0. Quit.
Notes on Options
i. For option 1, alphabetical ordering of pupils must be maintained.
ii. When specifying date of birth for option 1, you should choose your own format (and let the user know what it is). E.g., 14/9/08 or 14/09/2008. Whatever format you choose, though, the date of birth must be entered as a single string.
iii. For option 2, pupils' names following the one removed should be 'shuffled up' the array, to remove the space created by the removal.
iv. Any execution of options 1 and 2 must be reflected initially in the contents of the appropriate array(s) and then later (when option 0 is selected) in the contents of the data files.
v. For options 4, 7 and 11, each list should be displayed in a neat table (with column headings). Marks will be deducted for poor layout (and, in the case of options 4 and 7, for not being in alphabetical order). Surname column must precede first name(s) column.
vi. For option 4, teacher's name and room number must also be displayed.
vii. For options 5 and 6, the class number should be specified first.
viii. For option 6, there should be 3 address lines, the third holding the postcode.
ix. For options 2, 5 and 6, an appropriate error message should be displayed if the person is not found.
x. For option 8, it should be the highest mark in a specified subject within a specified class. Show both the pupil name and the mark. If there is more than one person with the highest mark, show just the first person with this mark.
xi. For option 9, display the student's name and date of birth.
xii. For option 11, the marks will be for one specified subject (1-5) in one specified class (1-3).
xiii. When option 0 is selected, the Pupil destructor should display each pupil's name, followed by the word 'removed' (pausing for a keypress each time, so that the name can be read).
Attachment:- Assignment.rar