Пример #1
0
 public void print()
 {
     Console.WriteLine("Pierwszy punkt odcinka: ");
     first.print();
     Console.WriteLine("Ostatni punkt odcinka: ");
     last.print();
 }
Пример #2
0
        static void Main(string[] args)
        {
            TPoint a = new TPoint(1, 2);
            TPoint b = new TPoint(3, 2);

            a.reciprocal();
            a.reverse();
            a.print();

            TSegment po = new TSegment(a, b);

            po.print();
            Console.WriteLine("--------------------------------------------");
            Console.WriteLine();

            TRasterSegment ab = new TRasterSegment(a, b);

            ab.generatePoints();
            ab.print();
            Console.WriteLine("--------------------------------------------");
            Console.WriteLine("\nDługość odcinka między punktami wynosi -> " + ab.length());
            Console.WriteLine();
            Console.WriteLine("--------------------------------------------");
            Console.WriteLine();

            Console.WriteLine("ComplexNumber: ");
            ComplexNumber cd = new ComplexNumber(-1, 2);

            cd.print();
            Console.WriteLine("\n--------------------------------------------");

            Console.WriteLine();
            Console.WriteLine("FullComplexNumer: ");
            FullComplexNumber ef = new FullComplexNumber(-2, 3);

            ef.print();

            Console.ReadKey();
        }