예제 #1
0
파일: Program.cs 프로젝트: ludsaq/Figure
        public Treangle(double Basis, double RightSide, double LeftSide)
        {
            this.Basis     = Basis.CheckSide();
            this.LeftSide  = LeftSide.CheckSide();
            this.RightSide = RightSide.CheckSide();

            CheckFigure.CheckSumSide(Basis, LeftSide + RightSide);
            CheckFigure.CheckSumSide(LeftSide, Basis + RightSide);
            CheckFigure.CheckSumSide(RightSide, LeftSide + Basis);

            Perimeter = CalculatePerimetr.Treangle(Basis, RightSide, LeftSide);
            Area      = CalculateArea.Treangle(Basis, RightSide, LeftSide);
        }
예제 #2
0
파일: Program.cs 프로젝트: ludsaq/Figure
        public Trapec(double SmallBasis, double RightSide, double BigBasis, double LeftSide, double Height)
        {
            this.SmallBasis = SmallBasis.CheckSide();
            this.BigBasis   = BigBasis.CheckSide();
            this.RightSide  = RightSide.CheckSide();
            this.LeftSide   = LeftSide.CheckSide();
            this.Height     = Height.CheckSide();

            CheckFigure.CheckSumSide(SmallBasis, BigBasis + RightSide + LeftSide);
            CheckFigure.CheckSumSide(BigBasis, SmallBasis + RightSide + LeftSide);
            CheckFigure.CheckSumSide(RightSide, BigBasis + SmallBasis + LeftSide);
            CheckFigure.CheckSumSide(LeftSide, BigBasis + RightSide + SmallBasis);

            Perimeter = CalculatePerimetr.Trapec(BigBasis, SmallBasis, RightSide, LeftSide);
            Area      = CalculateArea.Trapec(BigBasis, SmallBasis, Height);
        }