Hi,
I could do with some help please, worked on this all week and still do not know where to start. i need to wirte a program starting with a one dim array in one vb project then use a two dim array to do the same in a new vb project. I have tried a few options but with no valuable success or understanding. The last code i tried was:
Public Sub TestArray()
Dim output As String = ""
Dim test() As Boolean
test = New Boolean(0 To 10) {}
For i As Integer = 0 To test.GetUpperBound(0)
If i >= 0 Then
output &= (test(i))
MessageBox.Show(i & vbTab & output)
End If
Next
End Sub
Just to ensure i could create the array but i haven't manage to move from there. Any advice? do you think i need a resizeble array, please any advice will be helpfull.
The problem:
A manager in a transport company has asked you to make a program that facilitates booking of seats in their passenger buses. She is well aware of the fact that you are a beginner in programming and therefore does not expect you to make an advanced application. She has many ideas but she agrees with our plans to develop the application in different versions beginning with a simple one and then optimizing it in subsequent versions.
Seats are assumed to be numbered from 1 in the front row to a number in the last row.
Their transport equipments have different seating plans and passenger capacities.
Use a one-dimensional array (also called a vector) with elements containing
values of type Boolean to store reservation information. When a seat is to be reserved, a True value should be saved in the array at the position equal to the seat number minus one. This is because the array is indexed from zero, while seat numbers begin with 1. All vacant seats get a False value in the array.