17-12-2006, 02:13 AM
|
عضو جديد
|
|
تاريخ التسجيل: Dec 2006
المشاركات: 1
معدل تقييم المستوى: 0
|
|
ممكن مساعدة في حل
write a class rectangle with following
features:
the private members are two float variables:
- length
- width
the public members are function members whose prototypes
are:
-rectangle (int=0,int=0);//the constructor with default
argument
-float perimeter() const;//returns the perimeter of the
rectangle
-float area() const;//returns the area of the rectangle
-bool issquare() const;//returns true if this rectangle
is a square,false otherwise
write then a program that use rectangle objects.
-prompt the user for two float pairs L1 , W1 , L2 , W2
-declare two rectangle objects red, and green.
-say if these two rectangles have same area or same
perimeter and if whether they are squar
|