dim minutes as integer = 630
dim twoseater(1) as string
dim fourseater(1) as string
dim historic(1) as string
dim flightlength as integer
Console.WriteLine("Input plane type, 1 for 2 seater, 2 for 4 seater, 3 for Historic")
plane = console.ReadLine()
do until plane = 1 or plane = 2 or plane = 3
Console.WriteLine("Invalid value entered. PLease try again. 1 for 2 seater, 2 for 4 seater, 3 for Historic")
plane = Console.ReadLine()
console.WriteLine("Input flight length. Flight can be either 30 or 60 minutes")
flightlength = console.ReadLine()
do until flightlength = 30 or flightlength = 60
console.WriteLine("Invalid flight length. Please try again.")
flightlength = console.readline
noflights = minutes / flightlength
noflights = Math.Floor(noflights)
index = (flightlength / 30) - 2
income = twoseater(index) * noflights
income = fourseater(index) * noflights
income = historic(index) * noflights
Console.WriteLine("Maximum number of flights is " & noflights & " income is $" & income)
Dim booked2seater(noflights) As Boolean
Dim booked4seater(noflights) As Boolean
Dim bookedhistoric(noflights) As Boolean
dim lengthofflights as integer
dim maxflights as integer
console.WriteLine("input length of flights for the day")
lengthofflights = console.ReadLine()
Do until lengthofflights = 30 or lengthofflights = 60
Console.WriteLine("Invalid length of flight, must be 30 or 60")
lengthofflights = Console.ReadLine()
If lengthofflights = 30 then
ElseIf lengthofflights = 60 then
Dim booked(maxflights) as string
Dim booking2seater(maxflights) as decimal
Dim booking4seater(maxflights) as decimal
Dim bookinghistoric(maxflights) as decimal
Dim totalflights(2) as decimal
Dim aircrafts() as string = {"2 seater plane", "4 seater plane", "Historic plane"}
For k as integer = 0 To 2
Console.WriteLine("Time slot " & j & " - " & 7 + j & ":00" & " To " & 7+j & ":30" )
Elseif maxflights = 7 then
Console.WriteLine("Time slot 1 - 8:00 To 9:00")
Console.WriteLine("Time slot 2 - 9:30 To 10:30")
Console.WriteLine("Time slot 3 - 11:00 To 12:00")
Console.WriteLine("Time slot 4 - 12:30 To 13:30")
Console.WriteLine("Time slot 5 - 14:00 To 15:00")
Console.WriteLine("Time slot 6 - 15:30 To 16:30")
Console.WriteLine("Time slot 7 - 17:00 To 18:00")
Console.WriteLine("Enter Bookings for " & aircrafts(k))
Console.WriteLine("Is Booking Slot " & i & " booked? Type Booked or Free")
Booked(i) = Console.ReadLine()
Do Until Booked(i) = "Booked" or Booked(i) = "Free"
Console.WriteLine("Invalid Input, must be Booked or Free")
Booked(i) = Console.ReadLine()
If Booked(i) = "Booked" then
Console.WriteLine("Time slot " & j & " - " & 7 + j & ":00" & " To " & 7+j & ":30: " & Booked(j))
Elseif maxflights = 7 then
Console.WriteLine("Time slot 1 - 8:00 To 9:00: " & Booked(1))
Console.WriteLine("Time slot 2 - 9:30 To 10:30: " & Booked(2))
Console.WriteLine("Time slot 3 - 11:00 To 12:00: " & Booked(3))
Console.WriteLine("Time slot 4 - 12:30 To 13:30: " & Booked(4))
Console.WriteLine("Time slot 5 - 14:00 To 15:00: " & Booked(5))
Console.WriteLine("Time slot 6 - 15:30 To 16:30: " & Booked(6))
Console.WriteLine("Time slot 7 - 17:00 To 18:00: " & Booked(7))
Dim totalincome as decimal
Dim total2seater as decimal
Dim total4seater as decimal
Dim totalhistoric as decimal
Total2Seater = TotalFlights(0) * 100
Total4Seater = TotalFlights(1) * 120
TotalHistoric = TotalFlights(2) * 300
ElseIf maxflights = 7 then
Total2Seater = TotalFlights(0) * 150
Total4Seater = TotalFlights(1) * 200
TotalHistoric = TotalFlights(2) * 500
TotalIncome = Total2Seater + Total4Seater + TotalHistoric
Console.WriteLine("Total 2 Seater Income: $" & Total2Seater)
Console.WriteLine("Total 4 Seater Income: $" & Total4Seater)
Console.WriteLine("Total Historic Income: $" & TotalHistoric)
Console.WriteLine("Total Income: $" & TotalIncome)