عرض مشاركة واحدة
  #1 (permalink)  
قديم 17-12-2006, 02:13 AM
لعيون ريم لعيون ريم غير متصل
عضو جديد
 
تاريخ التسجيل: Dec 2006
المشاركات: 1
معدل تقييم المستوى: 0
لعيون ريم يستحق التميز
Post ممكن مساعدة في حل

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