Question: Please use only C++ 1) Write a class called rectangle It should have two dimensions and one area as variables (all integers and private) It

Please use only C++
Please use only C++ 1) Write a class called "rectangle" It should

1) Write a class called "rectangle" It should have two dimensions and one area as variables (all integers and private) It should also have three member functions as set(), get() and draw(). a) set() will simply set the dimensions of the rectangle (as two arguments supplied to the function), and also calculate the area and set it. b) draw() will draw the rectangle on the screen with characters if the dimensions are less than 80 by 20 (width x height), otherwise a message will be displayed as Not Possible to Draw". c) get() function simply returns the value of variable which holds the area. 2) Write a main function to exercise the operation. Create an object called myrectangle ask the user (in main) to enter dimensions and set the dimensions using set function and then draw this rectangle, also show area on screen

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!