'how do i declare a dimensional and parallel array

Write the class definition for a Student class that contains four private data members:
An int studNum to store the student number. A string studFirstName to store the student’s first name. A string studSurname to store the student’s surname. A one dimensional array subjectCode of type string that hold the five subjects that the student is registered for. A parallel array to the subject code array called finalMark that holds the final mark that the student obtained for the subject stored in the subject code array. A double overallAverage that will hold the overall average that the student has obtained for all the subjects that he/she is registered for.

The class has the following methods: A default constructor that sets the data members to appropriate default values for all data members, including the arrays. A setStudent method that receives parameters for the student number and name, as well as an array of type string and an array of type double for the subjects code and final mark respectively. A determineOverallAve that calculates and returns the overall average of the student for the five tests he/she is registered for. displayStudent that displays the student number, student surname concatenated with the first name with a space and comma in between (i.e. Meintjes, Maria), followed by the overall average on the screen.

Question 2: SecondYears

Create a front-end class SecondYears that will determine the best first year student. The class has the following data members: an array of ten student objects named myStudents. The class has the following methods enterStudentValues that prompts and reads the values that the each student has to be set to, and sets it accordingly. sortStudents that will sort the Students object in descending sequence of the overall average. Display that will display all the students in the array.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source