public class clsRactangle: clsshape
{
private float_height;
private float_width
public clsRactangle(float height, float width)
{
_height=height
_width=width
}
public clsRactangle()
{
}
public float Height
{
get
{
return_height;
}
set
{
_height=value;
}
}
public float Width
{
get
{
return_width;
}
set
{
_width=value;
}
}
public override void CalculateArea()
{
this.Area=_height*_width;
}
public override void CalculatePerimeter()
{
this.Perimeter=(_height*2)+(_width*2);
}
}
{
private float_height;
private float_width
public clsRactangle(float height, float width)
{
_height=height
_width=width
}
public clsRactangle()
{
}
public float Height
{
get
{
return_height;
}
set
{
_height=value;
}
}
public float Width
{
get
{
return_width;
}
set
{
_width=value;
}
}
public override void CalculateArea()
{
this.Area=_height*_width;
}
public override void CalculatePerimeter()
{
this.Perimeter=(_height*2)+(_width*2);
}
}
No comments:
Post a Comment