In this assignment, you will create a class, Faculty, derived from the Person class. Use the sample code for the VehicleWithWheels class as a model for what you need to do. You will also thoroughly test your class to verify that everything you want it to do is done correctly and efficiently.

//Private member data:
//    1. m_numDeg: number of degrees that the faculty member has (int).
//    2. m_degreesPtr: string pointer to memory where a dynamic string array is
//       located. Each element in the array contains the name of one of the
//       degrees. Each degree may have embedded spaces.
//       Example: M.S Computer Science

//Public functions:
//    1. Faculty(), Faculty(const char * name, int age, const string &ssn,
//       int numDeg, const string * degreesPtr), Faculty(const Faculty &s)
//    2. Provide "accessor" and "mutator" functions for
//       each of the member data items in the class.
//    3. Overload the Read and Write functions for the class. At this point you
//       should be in the habit of making the Read and Write functions of the base
//       class virtual, so you only need to overload the input and output
//       operators for the base class.

Tested thoroughly means:

All constructors tested.
All accessor and mutator functions tested.
All overloaded operators tested.
Specific to input and output operators:
a. Tested for both “common” I/O and file I/O.
b. For file I/O, write out at least two objects to a file, read the objects back into different variables. Verify that the corresponding objects are indeed the same.
Test a “const” object to make sure all operations possible on a “const” object function as required.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

#include "Faculty.h"

Faculty::Faculty(void) : Person()
m_degreesPtr = 0;
m_numDeg = 0;

Faculty::Faculty(const char * name, int age, const string &ssn,
       int numDeg, const string * degreesPtr)
   : Person(name, age, ssn)
m_degreesPtr = 0;
m_numDeg = 0;
for (int i = 0; i < numDeg; i++)

Faculty::Faculty(const Faculty &s)
m_degreesPtr = 0;
m_numDeg = 0;
const string * degreesPtr = s.getDegreesPt();
for (int i = 0; i < s.getNumDeg(); i++)

By purchasing this solution you'll be able to access the following files:

for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Visual Basic Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats