Answer to Question #278254 in C++ for Usman Ali

Question #278254

composite class and sequence of constructors use in composite class?


1
Expert's answer
2021-12-10T13:22:50-0500
#include <iostream>

using namespace std;

class Employee
{
private:
    int age;
    string name;
public:
    Employee(int, string) {
        this->age = age;
        this->name = name;
    }
    ~Employee();

    string getName() {
        return this->name;
    }

    int getAge() {
        return this->age;
    }
};

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog