this question is related to subject object oriented programming in c++ language. solve given question in dev c++ software. kindly send answer quickely. Question: Write a class named ExamScore that has the following member variables and functions. Protected Variables : char name[10], double *testscore , int subjects, double sum Functions: Setscore (index, marks) // it will store the marks at particular index in array. Findtotal() // it will find the sum of all the marks in array and stores it in sum variable. Displayscores()// it will display all the scores. Derive a class Result from ExamScore Class publically that has the following member variables and functions. Private Variables Max Functions: constructor (name,subjects) to initialize name and subjects variables. It will also initialize *testscore array dynamically by assigning it memory locations equal to subjects variable. Maximum () // it will find the maximum score in testscore array and stores it in Max variable. Write a main function that will declare an object of type Result which is initialized using a constructor by providing the name and total number of subjects. Then using a loop, ask the user to enter marks of all subjects and store those marks in a particular index in array using setscore() function. Then, display all the scores using for loop. Finally, display maximum, and total marks using for loop.
this question is related to subject object oriented programming in c++ language.
solve given question in dev c++ software. kindly send answer quickely.
Question:
Write a class named ExamScore that has the following member variables and functions.
Protected Variables : char name[10], double *testscore , int subjects, double sum
Functions:
Setscore (index, marks) // it will store the marks at particular index in array.
Findtotal() // it will find the sum of all the marks in array and stores it in sum variable.
Displayscores()// it will display all the scores.
Derive a class Result from ExamScore Class publically that has the following member variables and functions.
Private Variables Max
Functions: constructor (name,subjects) to initialize name and subjects variables. It will also initialize *testscore array dynamically by assigning it memory locations equal to subjects variable.
Maximum () // it will find the maximum score in testscore array and stores it in Max variable.
Write a main function that will declare an object of type Result which is initialized using a constructor by providing the name and total number of subjects. Then using a loop, ask the user to enter marks of all subjects and store those marks in a particular index in array using setscore() function. Then, display all the scores using for loop.
Finally, display maximum, and total marks using for loop.
Step by step
Solved in 7 steps