Пример #1
0
            public int CalculateArea()
            {
                int area = ((Ln1.CalculateLine() * Ln2.CalculateLine() * 2)
                            + (Ln2.CalculateLine() * Ln3.CalculateLine() * 2)
                            + (Ln1.CalculateLine() * Ln3.CalculateLine() * 2));

                return(area);
            }
Пример #2
0
            public int CalculateVolume()
            {
                int width  = Ln1.CalculateLine();
                int height = Ln2.CalculateLine();
                int lenght = Ln3.CalculateLine();
                int volume = (Ln1.CalculateLine()
                              * Ln2.CalculateLine()
                              * Ln3.CalculateLine());

                return(volume);
            }
Пример #3
0
            public string CalculateLenght()
            {
                string data   = "";
                int    width  = Ln1.CalculateLine();
                int    height = Ln2.CalculateLine();
                int    lenght = Ln3.CalculateLine();

                data = "Lenght = " + lenght.ToString() + " cm\n"
                       + "Width = " + width.ToString() + " cm\n"
                       + "height = " + lenght.ToString() + " cm\n";
                return(data);
            }