Thursday, May 18, 2017

Inheritance example in OPP's

public abstract class clsshape
{
public clsshape
{
}
private float_area;
private System.Drawing.Color_color;
private float_perimeter;
public float Area
{
get
{
return_area;
}
set
{
_area=value;
}
}
public System.Drawing.Color Color
{
get
{
return_color;
}
set
{
_color=value;
}
}
public float perimeter
{
get
{
return_perimeter;
}
set
{
_perimeter=value;
}
}
public abstract void CalculateArea();
 public abstract void CalculatePerimeter();
}


No comments:

Post a Comment