class Seat { private int table = 0; private int seat = 0; private string username = ""; public Seat(int table, int seat, string username) { this.table = table; this.seat = seat; this.username = username; } public Seat(int table, int seat) : this(table, seat, "") { } /// /// Optager denne plads med en bruger der tilhører et givent brugernavn /// /// /// public void reserveSeat(string username) { this.username = username; } public bool Reserved() { return this.username.Length > 0; } public int SeatNbr { get { return this.seat; } } public int TableNbr { get { return this.table; } } public override string ToString() { return "Bord: " + this.TableNbr + " plads: " + this.SeatNbr; } }