
-----------------------------------
MadeinChina
Tue Mar 07, 2006 7:14 pm

help me in array
-----------------------------------
need help on this program i suk in VB :/

A school auditorium has 20 rows
lettered AÂ·Â·Â·T with 25 seats per
row numbered 1Â·Â·Â·25.

Write a program to keep track
of the seat sales.

The price breakdown for seats is .
Rows AÂ·Â·Â·E - $12.00
Rows FÂ·Â·Â·K - $8.50
Rows LÂ·Â·Â·T - $6.25

1. The program should be able to display which seats are sold or which seats are available for any single section when requested.

2. The program should be able to determine and display the total dollar sales and the total number of seats sold for the auditorium or for any single section when requested.

_______________________________ Basic Program ____________________________

3. The program should allow for the purchase of more than one seat and display the seats purchased and the total cost for that transaction.

4. The program should allow for the price of the seats to be changed depending on the event.

5. The program should allow for the section designations to be changed depending on the event. Assume that there is a maximum number of three sections.

6. The program should allow tickets to be refunded.


Notes:
Â· All seat references should consist of the row letter followed by the seat number.
e.g. A10
Â· All dollar amounts should be formatted. e.g. $980.50
Â· The GUI should be user friendly
I think this program mostly needs is array and finding array lol help plz

-----------------------------------
cool dude
Tue Mar 07, 2006 9:05 pm


-----------------------------------
and your question is...? :?: 

your program is very simple, but nobody will do it for u. u have to try it, and if u still can't do it then post the question u need help with, not posting to do the program for u. READ THE RULES!!!

-----------------------------------
MadeinChina
Tue Mar 07, 2006 9:24 pm


-----------------------------------
my bad i want to know like the concept or what to do.

-----------------------------------
GlobeTrotter
Tue Mar 07, 2006 9:51 pm


-----------------------------------
Look into Types.  This is an example to get you started.  I'm not entirely sure if all of the syntax is even correct.


In a module, have:


Public Type SeatType
   Purchased As Boolean
End Type

Public Type RowType
   Cost As Single
   LetterID As String
   Seat (25) As SeatType
End Type



It may make the coding easier to make three arrays of rows, for each sections.  Or you can just use one, which is what I'll show.  Either way works.

In declarations, write something like:

   Dim RowArray  (20) As RowType


Then in your Initialization procedure (probably Form_Load) have something like this:


Dim iRowCount As Integer
Dim iSeatCount As Integer

For iRowCount = 1 to 20
   For iSeatCount = 1 to 25
      RowArray(iRowCount).Seat(iSeatCount).Purchased = False
   Next iSeatCount
   RowArray(iRowCount).LetterID = Chr(iRowCount) 'SOmething like that, play with it until it works and lines up with A through T
   If iRowCount 