Write a program that contains a class Rectangle with two private double precision members iLength and iWidth, public set and get member functions for these two members, a two-argument constructor that sets the length and width to any two user-specified values, and a function area() that computes the area. Example: > ./project6 Output: The area of the rectangle with width = 20 and length = 10 is 200. Length = 30 Width = 20 The area of the rectangle with width = 20 and length = 30 is 600. |
Source Code |