# 定义一个等腰梯形结构，包括上底、下底、高、腰长，以及计算梯形周长和面积的方法。

0

0
`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;        }    }`

您需要登录以后才能回答，未注册用户请先注册