예제 #1
0
파일: Class14.cs 프로젝트: piotr07da/marcin
        public void Test()
        {
            var circle       = new Circle();
            var conValueRead = new ConsoleValueReaderX();

            circle.CircleRadius = conValueRead.ReadDouble("Wpisz promień koła : ");
            circle.CircleRadius = circle.Scale(conValueRead.ReadDouble("Podaj współczynnik skalowania : "));

            Console.WriteLine("Pole koła to : " + circle.CalculateArea());
            Console.ReadKey();
        }
예제 #2
0
파일: Class13.cs 프로젝트: piotr07da/marcin
        public void Test()
        {
            var consoleValueReaderX = new ConsoleValueReaderX();
            var rec = new Rectangle();

            rec.Height = consoleValueReaderX.ReadDouble("Podaj Wysokość Prostokąta :");
            rec.Width  = consoleValueReaderX.ReadDouble("Podaj Szerokość Prostokąta :");

            double calculateArea = rec.CalculateArea();

            Console.WriteLine("Pole prostokąta to : " + calculateArea);

            Console.ReadKey();
        }