Question: Insert 3 a) Declare a class Rectangle (rectangle h file) with four private data members: x and y of type int (center of rectangle) and
Insert 3 a) Declare a class Rectangle (rectangle h file) with four private data members: x and y of type int (center of rectangle) and width and height of double type. Include the following public member functions: initializer, four get functions, one set function with four parameters, function area, function distance (from O (0, 0) to the center of the rectangle), function distanceR between the centers of two rectangles and function print. For all member functions use minimum number of parameters. one default constructor without parameters, one constructor (10 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
