Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. We will be treating the PersonType object as a base class that may be inherited by multiple objects. We will treat the personType getAddress

1. We will be treating the PersonType object as a base class that may be inherited by multiple objects. We will treat the personType getAddress and setAddress as pure virtual because we wish to have all inherited objects to code these functions but do not need them in the base class. Using the code for person type provided in program examples do the following: a. Make the following function a pure virtual function: print . This function must remain const. b. Create the following functions as pure virtual functions: getAddress setAddress 2. For the purpose of this lab, we will create only one inherited Class: StudentType. Create the class, inherited as public from Persontype with the following properties: a. Private data members: major id gpa address (just one string address) b. Create the proper public functions to properly access and set private data members. Create a default constructor and an overloaded constructor to set ALL data member values. c. Overload the proper functions to retrieve, set, and process data members of the base class d. Create two studentType objects: One using the default constructor. Set all private and inherited data members using functions. One using the overloaded constructor, which sets all the private and inherited data members e. Print the following for the student objects: First Name Last Name Major Id GPA Address

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions

Question

1. Define mass and mediated communication

Answered: 1 week ago