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

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

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!