public Aviareys(string naznach, int number, int vmestimost)
this.vmestimost = vmestimost;
public override string ToString()
return String.Format("Пункт назначения: {0}\nНомер: {1}\nВместимость: {2}", naznach, number, vmestimost);
public override bool Equals(object obj)
Aviareys test = (Aviareys)obj;
if (test.naznach != this.naznach || test.number != this.number || test.vmestimost != this.vmestimost )
public abstract double Square();
public abstract double Perimetr();
public abstract void Out();
public abstract string Name{ get;}
public Rectangle(double a, double b)
public override double Square()
public override double Perimetr()
public override string Name
public override void Out()
Console.WriteLine("Первая сторона - {0}", a);
Console.WriteLine("Вторая сторона - {0}", b);
Console.WriteLine("Площадь - {0}", Square());
Console.WriteLine("Периметр - {0}", Perimetr());
Console.WriteLine("Название фигуры - {0}", Name);
public static void Main()
Aviareys Arkhangelsk = new Aviareys();
Aviareys SaintPetersburg = new Aviareys("Saint-Petersburg", 790, 150);
Console.WriteLine(Arkhangelsk.ToString());
Console.WriteLine(SaintPetersburg.ToString());