Console.WriteLine("Input the type of plane (2 seater), (4 seater) or (historic)")
Dim plane As String = Console.ReadLine()
Do Until plane = "2 seater" Or plane = "4 seater" Or plane = "historic"
Console.WriteLine("This is an invalid input, try again")
plane = Console.ReadLine()
Console.WriteLine("Input the length of flight (30 minutes) or (60 minutes)")
Dim length As Decimal = Console.ReadLine()
Do Until length = 60 Or length = 30
Console.WriteLine("This is an invalid input, try again")
length = Console.ReadLine()
If plane = "2 seater" Then
ElseIf plane = "4 seater" Then
ElseIf plane = "historic" Then
Console.WriteLine("The maximum income for a " & length & " minute " & plane & " flight is $" & MaxIn)
Console.WriteLine("Input the length of flights for the day (30 minutes) or (60 minutes)")
Dim length As Decimal = Console.ReadLine()
Do Until length = 60 Or length = 30
Console.WriteLine("This is an invalid input, try again")
length = Console.ReadLine()
Dim times(MaxFt) As String
Dim slot2S(MaxFt) As String
Dim slot4S(MaxFt) As String
Dim slotH(MaxFt) As String
Dim tempslot As String = 0
Dim slots(MaxFt) As String
Dim FtTimes10() = {"8:00am", "9:00am", "10:00am", "11:00am", "12:00pm", "1:00pm", "2:00pm", "3:00pm", "4:00pm", "5:00pm", "6:00pm"}
Dim FtTimes7() = {"...", "8:00am", "9:30am", "11:00am", "12:30pm", "2:00pm", "3:30pm", "5:00pm"}
Do Until buffer = "finish"
Console.WriteLine("Input the type of plane you would like to to book (2 seater), (4 seater) or (historic)")
Dim plane As String = Console.ReadLine()
Do Until plane = "2 seater" Or plane = "4 seater" Or plane = "historic"
Console.WriteLine("This is an invalid input, try again")
plane = Console.ReadLine()
If plane = "2 seater" Then
ElseIf plane = "4 seater" Then
ElseIf plane = "historic" Then
Console.WriteLine(plane & " plane:")
Console.WriteLine("Time slot " & i & "- " & FtTimes10(i) & ": " & slots(i))
Console.WriteLine("Time slot " & i & "- " & FtTimes7(i) & ": " & slots(i))
Console.WriteLine("What time slot would you like? 1 to " & MaxFt)
tempslot = Console.ReadLine()
Do Until tempslot >= 1 And tempslot <= MaxFt And tempslot Mod 1 = 0
Console.WriteLine("This is an invalid input, try again")
tempslot = Console.ReadLine()
If slots(tempslot) = "Booked" Then
Console.WriteLine("This slot is booked, try again")
tempslot = Console.ReadLine()
Loop Until slots(tempslot) = "Free"
If plane = "2 seater" Then
slot2S(tempslot) = "Booked"
ElseIf plane = "4 seater" Then
slot4S(tempslot) = "Booked"
ElseIf plane = "historic" Then
slotH(tempslot) = "Booked"
Console.WriteLine("Would you like to (continue), (change) plane or (finish) booking?")
buffer = Console.ReadLine()
Do Until buffer = "continue" Or buffer = "change" Or buffer = "finish"
Console.WriteLine("This is an invalid input, try again")
buffer = Console.ReadLine()
If buffer = "continue" Then
Dim count2 As Integer = 0
Dim count4 As Integer = 0
Dim countH As Integer = 0
If slot2S(i) = "Booked" Then
ElseIf slot4S(i) = "Booked" Then
ElseIf slotH(i) = "Booked" Then
Console.WriteLine("Number of 2 seater plane flights: " & count2)
Console.WriteLine("Number of 4 seater plane flights: " & count4)
Console.WriteLine("Number of historic plane flights: " & countH)
Console.WriteLine("2 seater plane:")
Console.WriteLine("Time slot " & i & "- " & FtTimes10(i) & ": " & slot2S(i))
Console.WriteLine("4 seater plane:")
Console.WriteLine("Time slot " & i & "- " & FtTimes10(i) & ": " & slot4S(i))
Console.WriteLine("historic plane:")
Console.WriteLine("Time slot " & i & "- " & FtTimes10(i) & ": " & slotH(i))
Console.WriteLine("2 seater plane:")
Console.WriteLine("Time slot " & i & "- " & FtTimes7(i) & ": " & slot2S(i))
Console.WriteLine("4 seater plane:")
Console.WriteLine("Time slot " & i & "- " & FtTimes7(i) & ": " & slot4S(i))
Console.WriteLine("historic plane:")
Console.WriteLine("Time slot " & i & "- " & FtTimes7(i) & ": " & slotH(i))
total = count2 + count4 + countH
Console.WriteLine("Amount earnt by 2 seater plane is $" & count2)
Console.WriteLine("Amount earnt by 4 seater plane is $" & count4)
Console.WriteLine("Amount earnt by historic plane is $" & countH)
Console.WriteLine("Total amount earnt is $ " & total)