for i = 0 to storedbookings.length - 1
dim cabins() = {"--Hetty-- ", "--Poppy-- ", "--Blue Skies-- ", "--Bay view-- ", "--Happy Days-- ", "--Summer Joy-- ", "--Walkers' Rest-- ", "--Bertie-- ", "--Green Forest Lodge--", "--Coppice Lodge-- "}
dim capacities() = {4, 4, 4, 6, 6, 6, 8, 8, 10, 10}
dim peakPrice = {400, 400, 500, 650, 695, 800, 950, 1050, 1200, 1500}
dim offPeakPrice = {250, 250, 350, 500, 550, 600, 750, 850, 950, 1150}
Console.WriteLine("[ID] [Name] [Capacity] [PeakPrice] [OffpeakPrice]")
for i = 0 to cabins.length - 1
console.Writeline(" " & i & " " & cabins(i) & " " & capacities(i) & " " & peakprice(i) & " " & offpeakPrice(i))
console.Writeline("cabins that have already been booked " & BookingC)
console.Writeline("Enter An ID")
dim cabinID as integer = console.Readline()
do until CabinID < 10 and cabinID >= 0
Console.WriteLine("Enter an ID between 0-9 incl.")
cabinID = console.ReadLine()
dim cabin = cabins(cabinID)
console.Writeline("You have chosen " & Cabin)
console.writeline("Enter start week for " & cabin & " between the weeks 23-39")
dim startweek as decimal = console.readline()
do until startweek >= 23 And startweek <= 39
Console.WriteLine("Enter a value between 23 and 39 (inclusive)")
startweek = Console.readline()
console.writeline("Enter end week for " & cabin & " between the weeks 23-39")
dim endweek as decimal = console.Readline()
do until endweek >= 23 And endweek <= 39
Console.WriteLine("Enter a value between 23 and 39 (inclusive)")
endweek = Console.readline()
BookingC = startweek * 10000 + endweek * 100 + cabinID
for i = startweek to endweek
if storedbookings(cabinID * 17 + i - 23) > 0 then
Console.Writeline("Your booking code is :" & BookingC)
for i = startweek to endweek
if i >= 27 and i <= 35 then
price += PeakPrice(cabinID)
price += Offpeakprice(CabinID)
dim discountedprice as decimal
dim week = (endweek+1) - startweek
discountedprice = price - (price * 0.1)
console.Writeline("No discount given")
console.Writeline("Original Price :$" & Price)
console.Writeline("Discounted Price :$" & discountedprice)
console.Writeline("This Cabin Has Been Booked For These Weeks, Please Try Again")
for i = startweek to endweek
storedbookings(cabinID * 17 + i - 23) = bookingC
console.Writeline("do you wish to make another booking?")
dim cabins() = {"--Hetty-- ", "--Poppy-- ", "--Blue Skies-- ", "--Bay view-- ", "--Happy Days-- ", "--Summer Joy-- ", "--Walkers' Rest-- ", "--Bertie-- ", "--Green Forest Lodge--", "--Coppice Lodge-- "}
dim capacities() = {4, 4, 4, 6, 6, 6, 8, 8, 10, 10}
dim peakPrice = {400, 400, 500, 650, 695, 800, 950, 1050, 1200, 1500}
dim offPeakPrice = {250, 250, 350, 500, 550, 600, 750, 850, 950, 1150}
Console.WriteLine("[ID] [Name] [Capacity] [PeakPrice] [OffpeakPrice]")
for i = 0 to cabins.length - 1
console.Writeline(" " & i & " " & cabins(i) & " " & capacities(i) & " " & peakprice(i) & " " & offpeakPrice(i))
console.Writeline("cabins that have already been booked " & BookingC)
dim cabins() = {"--Hetty-- ", "--Poppy-- ", "--Blue Skies-- ", "--Bay view-- ", "--Happy Days-- ", "--Summer Joy-- ", "--Walkers' Rest-- ", "--Bertie-- ", "--Green Forest Lodge--", "--Coppice Lodge-- "}
dim capacities() = {4, 4, 4, 6, 6, 6, 8, 8, 10, 10}
dim peakPrice = {400, 400, 500, 650, 695, 800, 950, 1050, 1200, 1500}
dim offPeakPrice = {250, 250, 350, 500, 550, 600, 750, 850, 950, 1150}
Console.WriteLine("[ID] [Name] [Capacity] [PeakPrice] [OffpeakPrice]")
for i = 0 to cabins.length - 1
console.Writeline(" " & i & " " & cabins(i) & " " & capacities(i) & " " & peakprice(i) & " " & offpeakPrice(i))
console.Writeline("Enter An ID")
dim cabinID as integer = console.Readline()
do until CabinID < 10 and cabinID >= 0
Console.WriteLine("Enter an ID between 0-9 incl.")
cabinID = console.ReadLine()
console.Writeline("How many people are staying in this cabin?")
dim cap = console.Readline()
if cap > capacities(cabinID) or cap > 0
console.Writeline("Too many people, Please try again")