public static void Main()
Cabin[] cabins = new Cabin[10];
string[] names = new string[] {"Hetty ", "Poppy ", "Blue Skies ", "Bay View ", "Happy Days ", "Summer Joy ", "Walkers' Rest ", "Bertie ", "Green Forest Lodge", "Coppice Lodge "};
int[] capacities = new int[] {4, 4, 4, 6, 6, 6, 8, 8, 10, 10};
int[] Peak = new int[] {400, 400, 500, 650, 695, 800, 950, 1050, 1200, 1500};
int[] OPeak = new int[] {250, 250, 350, 500, 550, 600, 750, 850, 950, 1150};
for (int i = 0; i < cabins.Length; i++)
cabins[i] = new Cabin(names[i], capacities[i], i, Peak[i], OPeak[i]);
Console.WriteLine("V = Vacant, O = Occupied");
Console.WriteLine("//ID// //Name// " + "//Capacity// " + "//Bookings//" + " Peak" + " Off Peak");
for (int i = 0; i < cabins.Length; i++)
Console.WriteLine("Enter the ID of the cabin you wish to book.");
int cabinID = Convert.ToInt32(Console.ReadLine());
public string[] bookings;
public Cabin(string _name,int _capacity, int _id, int _peak, int _offPeak)
bookings = new String[17];
for (int i = 0; i < bookings.Length; i++) {bookings[i] = "V";}
string bookingString = "";
for (int i = 0; i < bookings.Length; i++)
bookingString += bookings[i];
Console.WriteLine(" " + id + " " + name + " " + capacity + " " + bookingString + " " + peak + " " + offPeak);
public string bookingCode;
public Booking(Cabin _cabin, int startWeek, int endWeek)
for (int i = startWeek; i < endWeek + 1; i++)
public void GenerateBookingCode(int startWeek, int endWeek)
string str = cabin.id.ToString() + startWeek.ToString() + endWeek.ToString();