Question: c++ Define a class Student that has the private members name, department, and mark. The class has the public members sero), getMark().get().print(), and a default

 c++ Define a class Student that has the private members name,c++

Define a class Student that has the private members name, department, and mark. The class has the public members sero), getMark().get().print(), and a default parameterized constructor (with default values "Ali" as a name, "Physics" as a department, and 83 as a mark). Define a class Section that has the private members number, numberO/Students, and a pointer p of type Student. The class has the public members sero), print(), findAverage(), and a default parameterized constructor (with default values 11 as the section number, and 12 students). Write the definition of the two classes Student and Section with their implementations, enforcing the least privileged principle. The following driver produces the given sample of output: int main() } Section abc(11, 2); abc.print): abc.set(4); abc.printo: return 0; Sample output: Section 11 has the following students: Ali from the Physics department scored 83 Ali from the Physics department scored 83 The section average is 83 Section 4 has the following students: Abass from the Physics department scored 43 Adel from the CS department scored 63 Amal from the Engineering department scored 87 The section average is 64.3333

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!