static void Main(string[] args)
        {
            Rectangle4 r = new Rectangle4();

            r.Acceptdetails();
            r.Display();
            Console.ReadLine();
        }
Exemple #2
0
 public void Run()
 {
     try
     {
         Console.WriteLine("Enter, please, x and y");
         int        x      = Int32.Parse(Console.ReadLine());
         int        y      = Int32.Parse(Console.ReadLine());
         Figure4    figura = new Figure4(x, y);
         Rectangle4 rec    = new Rectangle4(x, y);
         Square4    sq     = new Square4(x, y);
         DrawAll(figura, rec, sq);
     }
     catch (FormatException)
     {
         Console.WriteLine("You have not entered a number, try again");
     }
 }