C code help.

ViVaLaLude00

Beta member
Messages
1
ok i have to write a program heres my instructions im still pretty new to C and i need help getting started any help will be appreciated!!!!



The Cape Fear Airlines has one plane with a seating capacity of 12. It makes one flight daily. Write a seating reservation program with the following features:

The program uses an array of 12 structures. Each structure should hold a seat ID number, a marker that indicates whether the seat is assigned, the last name of the seat holder, and the first name of the seat holder.

The program displays the following menu:
To choose a function, enter its number:
1. Show the number of empty seats
2. Show a list of empty seats
3. Show by last name an alphabetical list of assigned seats
4. Assign a customer to a seat
5. Delete a seat assignment
6. Quit

The menu should be displayed after each choice except for choice 6.
Data is saved in a file between runs. When the program is restarted, it first loads in the data, if any, from the file.
 
For now I'll give you a bit of advice on getting a start at it. Code can come into it later if you still get stuck on parts.

First thing to do is to realize that anytime you are writing a menu driven program (I'm guessing for the command line!), you have to start with one function of the menu at a time. You aren't really writing a menu driven program so much as 6 programs that get called by the one that displays the menu.

Begin with the data structure you'll need and implement it as needed for the first menu choice.;-) Take it in small bites and it shouldn't be too difficult. Post again if you're still stuck later. Below is the URL of a couple of sites. The first is a good reference page for C and C++ both. The second is a page with many links to goodies and tutorials for a bunch of languages.

http://www.cppreference.com

http://www.thefreecountry.com

Good luck on it, remain calm:)
 
Back
Top Bottom