using System.Diagnostics.Contracts; public enum SeatTypes { Casual, Premium, Business, } public class Seat { public int SeatNumber {get; set;} public bool IsReserved {get; set;} public string Mark {get; set;} public SeatTypes SeatType {get; set;} public Seat(){} public Seat(int SeatNumber, string mark = "NoName", SeatTypes type = SeatTypes.casual) { SeatNumber = SeatNumber; IsReserved = false; Mark = mark; SeatType = seatType; } public void Reserve() { IsReserved = true; System.Console.WriteLine($"Miejsce {SeatNumber} zostało zarezerwowane."); } public void CancelReservation() { IsReserved = false; System.Console.WriteLine($"Rezerwacja na miejsce {SeatNumber} zostało anulowane."); } }