Question: Construct a class named Rectangle that has double-precision data members named length and width. The class should have member methods named perimeter() and area() to
Construct a class named Rectangle that has double-precision data members named length and width. The class should have member methods named perimeter() and area() to calculate a rectangles perimeter and area, a member method named setData() to set a rectangles length and width, and a member method named showData() that displays a rectangles length, width, perimeter, and area. Include the Rectangle class constructed in Part A in a working C++ program. Design: Code: Output:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
