Writing a program that will determine the best Second year student.
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
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.
Comments
Leave a comment