Define the class Student which has the private members name, department, and mark. It has the public members set(), getMark(), get() (to get the student's name and department). 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 called Section which has the private members title, length, and a pointer p of type Student. It has the public members set(), print(), and a default parameterized constructor (with default values "A" as a course title, and 12 students). The class also has a member function average() to find the section average, and a copy constructor. Implement the two classes Student and Section enforcing the least privileged principle. Read the following records fro the file "student.txt". Abass Physics Adel Computer Amal Engineering 87 43 63
Define the class Student which has the private members name, department, and mark. It has the public members set(), getMark(), get() (to get the student's name and department). 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 called Section which has the private members title, length, and a pointer p of type Student. It has the public members set(), print(), and a default parameterized constructor (with default values "A" as a course title, and 12 students). The class also has a member function average() to find the section average, and a copy constructor. Implement the two classes Student and Section enforcing the least privileged principle. Read the following records fro the file "student.txt". Abass Physics Adel Computer Amal Engineering 87 43 63
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 9PE
Related questions
Question
100%
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,