Define the class Student which has the private members name, ID, GPA, numberOfCourses, marks[] (one dimensional array of type integer to store the marks), credits[] (one dimensional array of type integer to store the credits), and calculateGPAO) a function to calculate the GPA. The class also has the public members ser), getName(), print), a default constructor, and constructor with parameters. Implement the member functions of the class Student, enforcing the least privileged principle. The following driver produces the given sample of input/output: int main() string sName, SID; int sNumOf Course: Student w w.print(); Student ("U7654321", "Ali", 3); v.print(); cout<<"Enter the ID, name, number of courses for the student" cin >> sID >> Name >> NumOfCourse; w.set(sID, sName, sNumOfCourse) w.print(); return 0; << endl; Create a project containing the class interface in a header file (Student h), the class implementation in a (Studentimp.cpp) file and the driver in a (Student.cpp) file. Sample Output: U1234567 XYZ has GPA 3 Enter marks and credits of Ali courses Mark and credit of course # 1: 80 3 Mark and credit of course # 2: 105 3 Mark and credit of course #3: 92 4 U7654321 Ali has GPA 2.5 Enter the ID, name, number of courses for the student U8765432 Omar 4 Enter marks and credits of Omar courses Mark and credit of course # 1: 72 3 Mark and credit of course # 2: 963 Mark and credit of course # 3: 82 7 Mark and credit of course # 4: 60 3 U8765432 Omar has GPA 2.33333

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
Define the class Student which has the private members name, ID,
GPA, numberOfCourses, marks[] (one dimensional array of type integer
to store the marks), credits[] (one dimensional array of type integer to
store the credits), and calculateGPA() a function to calculate the GPA.
The class also has the public members ser().getName(), print), a default
constructor, and constructor with parameters.
Implement the member functions of the class Student, enforcing the
least privileged principle.
The following driver produces the given sample of input/output:
int main()
string sName, SID;
int sNumOfCourse;
Student w;
w.print();
Student v("U7654321", "Ali", 3);
v.print():
cout<<"Enter the ID, name, number of courses for the student"
cin >> sID >> sName >> NumOfCourse;
w.set(sID, sName, sNumOfCourse);
w.print();
return 0;
<< endl;
Create a project containing the class interface in a header file
(Student.h), the class implementation in a (StudentImp.cpp) file and the
driver in a (Student.cpp) file.
Sample Output:
U1234567 XYZ has GPA 3
Enter marks and credits of Ali courses
Mark and credit of course # 1: 80 3
Mark and credit of course # 2: 105 3
Mark and credit of course # 3: 92 4
U7654321 Ali has GPA 2.5
Enter the ID, name, number of courses for the student
U8765432 Omar 4
Enter marks and credits of Omar courses
Mark and credit of course # 1: 72 3
Mark and credit of course # 2: 963
Mark and credit of course # 3: 82 7
Mark and credit of course # 4: 60 3
U8765432 Omar has GPA 2.33333
Transcribed Image Text:Define the class Student which has the private members name, ID, GPA, numberOfCourses, marks[] (one dimensional array of type integer to store the marks), credits[] (one dimensional array of type integer to store the credits), and calculateGPA() a function to calculate the GPA. The class also has the public members ser().getName(), print), a default constructor, and constructor with parameters. Implement the member functions of the class Student, enforcing the least privileged principle. The following driver produces the given sample of input/output: int main() string sName, SID; int sNumOfCourse; Student w; w.print(); Student v("U7654321", "Ali", 3); v.print(): cout<<"Enter the ID, name, number of courses for the student" cin >> sID >> sName >> NumOfCourse; w.set(sID, sName, sNumOfCourse); w.print(); return 0; << endl; Create a project containing the class interface in a header file (Student.h), the class implementation in a (StudentImp.cpp) file and the driver in a (Student.cpp) file. Sample Output: U1234567 XYZ has GPA 3 Enter marks and credits of Ali courses Mark and credit of course # 1: 80 3 Mark and credit of course # 2: 105 3 Mark and credit of course # 3: 92 4 U7654321 Ali has GPA 2.5 Enter the ID, name, number of courses for the student U8765432 Omar 4 Enter marks and credits of Omar courses Mark and credit of course # 1: 72 3 Mark and credit of course # 2: 963 Mark and credit of course # 3: 82 7 Mark and credit of course # 4: 60 3 U8765432 Omar has GPA 2.33333
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Data members
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
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