Question: Taking into account the following classes: class Class1{ public: Class1(); int getX(); int getY(); int setX(int); int setY(int); void operator +=(Class1 &tmp); int operator *(int

Taking into account the following classes:

class Class1{

public: Class1();

int getX();

int getY();

int setX(int);

int setY(int);

void operator +=(Class1 &tmp);

int operator *(int n);

void operator *=(Class1 &tmp);

Class1 *operator +=(Class1 &tmp);

private: int x;

int y; };

Class Class2:public Class1{

public: Class2();

int getZ();

void setZ(int );

private:

int z;};

Class2 objects also have the attributes of Class1?

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!