The following list of specific requirements are roughly in the order of complexity, with the later items being more challenging in general. It is anticipated that one has to have a solid work for items 1-6 below in order achive a pass grade for this assignment. Item 8 is what a student should be able to do well if he or she aims to achieve a credit or above, while item 9 is for those who aim at distinction or high distinct grade for this assignment.

1. (1 mark) Function callings are indispensible in just about every C++ program that is supposed to be able to achieve something non-trivial. To refresh ourselves, explain the difference between passing by value and passing by reference in function calling. Use your own concrete C++ code to exemplify your explanations.
2. (1 mark) Looping is equally indispensible in any decent C++ programs. Explain the similarity and differences between a while loop and a for loop in C++.
3. (2 mark) The program should be menu-driven, and the menu should look like

MAIN MENU
0. Exit
1. Add a student mark
2. List all student marks
3. Calculate the marks average
4. Calculate the standard deviation
5. Delete a student mark
6. Find the number of students via a mark
7. Display distinct marks and their occurrences

Your choice ->

You may utilise any parts of the trivial menu in Tutorial 7 (or the sample menu in Lecture 9), and in particular those clrscr() and pause() functions

Code:
void clrscr() 
      {
        system("cls");
      }

      void pause() 
      {
        system("echo.");
        system("echo.");
        system("pause");
      }
This part is to implement a valid selection system for a menu, i.e. the skeleton of a menu system that doesn't do much other than allowing the selections one after another, and displaying the confirmation on which selection you have just made. You have to provide a separate driver program to demonstrate this, unless this functionality will be illustrated in your final program.
4. (3 marks) This is for the implementation of the menu options 1. to 3.. For simplicity, we assume that the total number of marks to be analysed will not exceed 1000 within the program. When menu option 1. is selected, the program will let you add just one mark before returning you to the menu. When menu option 2. is selected, the program will list all the marks which have been added so far, some of which may be equal in value, then pause the screen for viewing before returning to the menu again. When menu option 3. is selected, the program will calculate and display the average of all the added marks, before returning again to the menu. You are welcome to design your program in whichever way you wish, as long as it is consistent with the general design principles. However, you are also welcome to implement the following prototyped functions or their variants for this purpose

Code:
bool addMark(double allMarks[], int &totalRec, double &mark);
      bool displayMarks(double allMarks[], int totalRec);
      bool findMean(double allMarks[], int totalRec, double &mean);
where the array allMarks is assumed to contain totalRec number of valid marks, mark may be used to pass back the actual mark successfully added, and mean may be used to pass back the average of all the marks. The bool value returned by a function may be used to indicate whether the operation has been successful or not.
5. (1 mark) For the program that has been developed up to this point, i.e. to the implementation of menu options 0. to 3., draw the Structure Diagram.
6. (Make-Up Clause) If a student is unable to complete the following advanced features (7 marks in all), the student may choose to do 6 practice quizzes to at least gain a possible additional 3 (in stead of the full 7) marks. If this is the case, the student will have to state explicitly, in a clear highlighted paragraph, that they are opting for doing merely the 6 practice quizzes. In this case, the student work for these advanced features, if any, will not be marked and will thus not receive any marks. If a clear and explicit statement is not made by the student for the choice of doing the practice quizzes within his/her submission of this assignment, then it will be deemed that the student has chosen not to opt for the quizzes. These 6 quizzes will each count for 0.5 mark, giving a maximum total of 3 marks. The 6 practice quizzes can be done as many times as you want (with solutions given at the end) through the quiz tab for the SESSION c01, c02, .., c06, or directly through the following quiz links 1, 2, 3, 4, 5, 6. Ideally, students will do these practice quizzes as soon as possible and can decide at the time of submission of this assignment on whether to take up this Make-Up Clause or not. Please read the section Practice Quizzes below for more details.
7. The following additional tasks are considered advanced features. As such, your C++ program will also be scrutinized more closely for the consistent coding style, meaningful variable names whenever suitable or necessary, proper spacing and alignment for the statements, active use of const variables for special quantities or values, sufficiently detailed and illuminative comments within the code. The program is also expected to provide clear input prompts and clean/well-formulated output, and to be written under the sound design principles.
8. (3 marks) This is for the implementation of the menu options 4. and 5.. This part is for students aiming at achieving credit or above. When menu option 4. is selected, the program will calculate and display the standard deviation of all the available marks, before returning to the menu. When menu option 5. is selected, the program will allow you to delete one instance of the mark you want to delete, unless the mark doesn't exist.

We recall that for a set of n values, x1, x2, x3, ..., xn-1, xn, its average μ (also denoted by an overline like x above the vector name x) or mean and the corresponding standard deviation σ are defined by

μ = ( x1 + x2 + x3 + ... + xn-1 + xn )/n,
σ2 = ( (x1 -μ)2 + (x2 -μ)2 + ... + (xn- μ)2 )/n

For a list of 3 marks 56.5, 64.5 and 57, for instance, then the number n of the marks is 3, the average μ of these marks and the standard deviation σ are

μ= (56.5 + 64.5 + 57)/3 = 59.33,
σ = ( ((56.5-59.33)2+(64.5-59.33)2+(57-59.33)2)/3 )1/2 = 3.6591.

9. (4 marks) This is for the implementation of the menu options 6. and 7.. This part is meant for the advanced students, aiming at achieving distinction or above. When menu option 6. is selected, the program will first read a mark from the user, and then search the available list of marks to see how many occurrences of this mark there are. It will then report this number of occurrences. When menu option 7. is selected, the program will go through all the distinctive marks in the list, and find out how many occurences there are for each of the distinctive marks. For instance, if the current list of marks contains

56, 67, 86, 56, 56, 67, 77

then the menu option 7. should generate something similar to

MARKS OCCURRENCES
56 3
67 2
86 1
77 1