خرید بک لینک

Public Class RectBox

}

Private int _height

Private int _width;

Public void SetHeight (int h)

{

_height=h;

}

Public int GetHeight ()

{

Return _height;

}

Public void SeWidth (int w)

{

_width=w;

}

Public int GetWidth ()

{

Return _width;

}

Public int Area ()

{

Return _width*_height;

}

Public int Surface ()

{

Return 2*(_height+_width);

----------------------------------------------

Rectbox (definition)= new rectbox();(creation)

Box.setwidth (10);

Box.setheight(20);

Int a=box.area();

Int s=box.surface();

----------------------------------------------


ادامه مطلب

برچسب: نویسنده: سارا حکیمی تاريخ: چهارشنبه 17 آبان 1396 ساعت: 16:38

صفحه بندی