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
Get step-by-step solutions from verified subject matter experts
