public class Trapezia
{
public Trapezia()
{
}
public Trapezia(decimal sd,decimal xd,decimal g,decimal y)
{
this.Sd = sd;
this.Xd = xd;
this.G = g;
this.Y = y;
}
private decimal _sd;
public decimal Sd
{
get
{
return _sd;
}
set
{
_sd = value;
}
}
private decimal _xd;
public decimal Xd
{
get
{
return _xd;
}
set
{
_xd = value;
}
}
private decimal _g;
public decimal G
{
get
{
return _g;
}
set
{
_g = value;
}
}
private decimal _y;
public decimal Y
{
get
{
return _y;
}
set
{
_y = value;
}
}
public decimal Mianzhi()
{
return (Sd + Xd) * G / 2;
}
public decimal Zhouchang()
{
return Sd + Xd + 2 * Y;
}
}