Define a class called student that has the following data members: - int student number - string student name - double student average The following member functions: - Constructor that initialize the data members with default values. - set and get functions for each data member - Print function to print the values of data members. Define a class called graduatestudent that inherits data members and functions from the class student, and then declare the following data members : - int level - int year Member functions: - constructor -set and get functions for each data member - Print function. Define a class called master that inherits data members and functions from graduatestudent class, and then declare the following data member: - int newid. Member function: - constructor - set and get function for the data member - Print function. Write a driver program that: - Declare object of type student with suitable values then print it - Declare object of type master with your information then print it. C++

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter11: Introduction To Classes
Section11.2: Basic Class Functions
Problem 5E
icon
Related questions
Question

Define a class called student that has the
following data members: - int student number
- string student name
- double student average
The following member functions:
- Constructor that initialize the data
members with default values. - set and get
functions for each data member
- Print function to print the values of data members.
Define a class called graduatestudent that inherits
data members and functions from the class student,
and then declare the following data members :
- int level
- int year
Member functions:
- constructor -set and get functions for each data member
- Print function.
Define a class called master that inherits data members and
functions from graduatestudent class, and then declare the
following data member: - int newid.
Member function:
- constructor
- set and get function for the data member
- Print function.
Write a driver program that:
- Declare object of type student with
suitable values then print it - Declare object
of type master with your information then
print it. C++

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT