Question: Please fix the code below and DO NO Modify. I want if input ('P', Paul) so output should be (Pilot : Paul). and If input

Please fix the code below and DO NO Modify. I want if input ('P', "Paul") so output should be (Pilot : Paul). and If input ('A', "Paul") so output should be (Attandent: Paul). Thanks

#include

using namespace std;

class Aircrew{

Aircrew(string name_str);

static Aircrew *makeAircrew( char ch ,string name_str);

virtual const std::string type(void) const = 0;

const std::string name(void) const;

void print(void)const;

protected:

const string nm;

};

class Pilot: public Aircrew

{

public:

Pilot(string name_str);

};

int main(){

Aircrew *obj2 = Aircrew:: makeAircrew( 'P',"Paul");

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!