Results 1 to 2 of 2

Thread: Seat reservation program

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2011
    Posts
    15

    Seat reservation program

    Hello everyone,
    I have this assignment that I dont understand. It is a very long assignment I think.I don't want any code or something like that. I need to understand what i am suppose to do then I have to start thinking about codes. Now you may say just ask your teacher. The problem is It is the weekend and i want to get started on this assignment and I think next week I might miss couple days so that is why I decided to put it here so I can understand just a little what I am suppose to do.

    Here is the assignment:

    A,local high school needs a reservation application to keep track of seats that are reserved for the school plays scheduled throughout the year.

    Main Form — frmReservation
    A menustrip control will be needed to have a menu title of File that contain the following menu items" Open, Save, Exit

    File/Open menu item:
    Check to see if the following disk file exists within the BIN\Debug folder — ReservedSeats.dat
    If the file does not exist inform the user that a reservation file is not available to open. If the file exists then the disk file will be opened and the following tasks will have to occur:
    1. Read through the entire disk file and load a one dimensional array that has been defined as the following structure...
    Structure ReservationStruc
    Public Name as string
    Public Phone as string
    Public DateReserved as date
    End structure.
    2. Set up the logic so subscript 1 of the array matches to seat number 1, subscript 2 of the array to seat number 2, etc...
    3. If a seat is reserved the background color of the label should be yellow. A procedure has been coded for you to use to accomplish this task.


    File/Save menu item: The entries in the array used to keep track of the current session's seating should be written to the ReservedSeats.dat file (DO NOT APPEND IT, overwrite it) ONLY IF the Name array element is not empty.

    Two formats can be used to save the disk file:

    The format of the fixed width disk file is:
    Seat— 2 characters
    Name — 30 characters
    Phone — 15 characters
    Date Reserved — 10 characters
    NewLine character — 2 characters

    The format of the variable length disk file is:
    Seat, Name, Phone ,Date Reserved, NewLine characters

    Double-Clicking a Seat : If the seat has already been assigned then the reserved information should be displayed within the Seat Reservation form when loaded.

    Seat Assignment Form - frmSeat


    Save Button: All fields are required, therefore, make sure the input data is valid. If the data is good then make sure the correct array element is updated and then close the form. The reserved seat's background must be changed to yellow.



    Remove Button: When clicked it should remove the person from the array that is defined as the Classroom structure by setting the name and phone members to an empty string. The background color of the seat should be white since it is not reserved anymore.


    The teacher designed the two forms for me. I attached 2 snapshot for the forms.


    And again I just need to understand how the should the program works.

    Thank you guys

    Regards
    Attached Images Attached Images   

  2. #2
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: Seat reservation program

    The programm will work with saved file. In this file the actual reservation is stored.
    The programm will open that file, read in the data and show it on the form.
    After that there are several possible interactions with that form.
    Reserve a new seat, clear a reservation .....
    All of them are decribed above, there is obviously even some code already prepared to use.
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width