Answer to Question #273870 in C++ for SUNIL

Question #273870

Write a Program to declare examination results. Design three classes: Student, Exam, Result. The Student class has the data members such as Rollno and name. Create the class Exam by inheriting the Student class. The Exam class includes the data members representing the marks scored in six subjects. Derive the Result from Exam class and it has its own data members such as Total marks as well as calculate the grade based on total marks. Display the result with all the student information in descending order of their grade.


1
Expert's answer
2021-12-06T05:30:09-0500
class Student {
private:
  string rollno;
  string name;
};
class Exam: public Student {
private:
  int *marks_scored;
  string subjects[6];
};
class Result: public Exam {
private:
  int total_marks;
};

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS