Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Define a Person class with the following class variables string name and address. For methods it should have a default constructor that sets both

C++

Define a Person class with the following class variables string name and address. For methods it should have a default constructor that sets both variables to the empty string. It should have an overloaded constructor that takes parameters for all variables. Each variable should have a setter and a getter. There should be a method getJob that is hard coded to return the string undefined. Define a class Instructor that is a Person. It should add the variable Office hours (a string) with setter and getter. It has a method getJob that is hard coded to return the string instructor. Define a class Student that is a Person. It should add the variable GPA which is a float along with setter and getter. It has a method getJob that is hard coded to return the string student. Use the test program in main to test your class

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

What are the duties of a trustee in a liquidation proceeding?

Answered: 1 week ago

Question

Briefly explain the role borders play in determining jurisdiction.

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago