Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 12-06-2006, 11:38 AM   #1
Beta Member
Join Date: Dec 2006
Posts: 1
Default C code help.

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.

ViVaLaLude00 is offline   Reply With Quote
Old 12-07-2006, 01:18 PM   #2
Baseband Member
Griz803's Avatar
Join Date: Jun 2004
Posts: 89
Default Re: C code help.

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.



Good luck on it, remain calm:-)
/*What does not kill us, makes us drink far too much caffeine*/
Griz803 is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 01:16 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0