You are viewing a single comment's thread. Return to all comments →
easy problem
/* * Create classes Rectangle and RectangleArea */ class Rectangle { public: virtual void display(){ cout << width << ' ' << height <<endl; } protected: int width; int height; }; class RectangleArea : public Rectangle{ public: void read_input(){ cin>>width>>height; cin.get(); } void display()override{ cout << width*height << endl; } };
Rectangle Area
You are viewing a single comment's thread. Return to all comments →
easy problem