using System.Collections.Generic;
using System.Threading.Tasks;
public static void Main()
Console.WriteLine("Hello World");
public abstract void PrintMotto();
private static int countOfCreatedObjects { get; set; } = 0;
public string Name_ { get => Name; set => Name = value; }
public int GeneralCount_ { get => GeneralCount; set => GeneralCount = value; }
public int UnavailableCount_ { get => UnavailableCount; set => UnavailableCount = value; }
public double PriceAtNight_ { get => PriceAtNight; set => PriceAtNight = value; }
public string Address_ { get => Address; set => Address = value; }
public int StaticField => countOfCreatedObjects;
public Hotel(String name)
public Hotel(String name, String address)
public Hotel(String name, String address, int genCount, int unavCount, double price)
this.UnavailableCount = unavCount;
this.GeneralCount = genCount;
this.PriceAtNight = price;
public override string ToString()
return "Название отеля - " + Name_ + "\n" +
"Адрес отеля - " + Address_ + "\n" +
"Общее количество номеров - " + GeneralCount_ + "\n" +
"Занято номеров - " + UnavailableCount_ + "\n" +
"Цена за ночь - " + PriceAtNight_ + "$\n";
class LuxaryHotel : Hotel
public double PriceAtVipNight_ { get => PriceAtVipNight; set => PriceAtVipNight = value; }
public int AvailableVipCount_ { get => AvailableVipCount; set => AvailableVipCount = value; }
public LuxaryHotel(String name, String address, int genCount, int unavCount, double price, double priceAtVipNight, int availableVipCount)
: base(name, address, genCount, unavCount, price)
this.PriceAtVipNight = priceAtVipNight;
this.AvailableVipCount = availableVipCount;
public override void PrintMotto()
Console.WriteLine("Лучшие и несправедливо дорогие");
public int CockroachesCount_ { get => CockroachesCount; set => CockroachesCount = value; }
public PoorHotel(String name, String address, int genCount, int unavCount, double price, int cockroachesCount)
: base(name, address, genCount, unavCount, price)
this.CockroachesCount = cockroachesCount;
public override void PrintMotto()
Console.WriteLine("C милым рай в шалаше");