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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%
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
Computer
Amal Engineering 87
43
Adel
63
The following driver produces the given sample output:
int main()
Section abc("Introduction to IT", 3);
abc.set("IT");
abc.print();
return 0:
Sample output:
IT has the following students:
Abass from the Physics department scored 43
Adel from the Computer department scored 63
Amal from the Engineering department scored 87
The section average is 64.3333
Transcribed Image Text: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 Computer Amal Engineering 87 43 Adel 63 The following driver produces the given sample output: int main() Section abc("Introduction to IT", 3); abc.set("IT"); abc.print(); return 0: Sample output: IT has the following students: Abass from the Physics department scored 43 Adel from the Computer department scored 63 Amal from the Engineering department scored 87 The section average is 64.3333
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Software Development
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education