Reservation Project

Posted on 2006-04-09
Last Modified: 2010-04-23
I have this program about Airline Reservation that is due tonight.  I have worked on it about 40 hours already and am completely lost.  I can't get past this part:
There are three arrays
   1) two dimensional array of strings to maintain a seating chart with passengers names.
   2) two dimensional control array to show available seats on the form.
   3) An array for the waiting list.

There are 10 rows with 4 seats in a row.  I cant get the area to update the text boxes (by colors- green if available, red if not).  I am really stuck and need some SERIOUS help, ASAP....
Question by:slyfist
    LVL 6

    Expert Comment

    Can you show what your code looks like now?
    LVL 14

    Accepted Solution

    As a possible startoff:

    just iterate through your passenger list.

    if you want to keep it very simple:
    first iterate all your controls and color them red
    then iterate all items in your seating chard
    if you find a passenger on seat, update the control array on that same index

    That pretty much covers your issue i guess
    LVL 2

    Expert Comment

    Hello slyfist,
              As your two dimensional arrays for names and availablility count will be same I dont think there will be much problem for you.

    Herein you have to follow a good naming convention to do it simpler. I would recommend you to postfix it with numbers as ctrl0101,ctrl0102 etc for controls. and psg0101,psg0102 for passenger array. The first 2 numbers would be x and second two would be y in the two dimensional arrays.

           Now it will be very easy for you to loop through them.

    while looping check the availability.I fpresent colour the control with that number to red. else green.  

    Or there is one more way set the tag for the control as the name of the passenger. then loop it and colour it.


    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now