i have been trying to work on this problem..how do i realy solve it?

in c++..You are the developer for taxiflite.com, a company which charters a light aircraft to
Capetown from Johannesburg. Write a program to assign seats on each flight of the
airline's only plane (capacity: 50 seats (10 rows (A-J) of 5 seats each)). The program
should display the following menu of alternatives: Please type 1 for "First class" and
Please type 2 for "Economy". If the person types 1 your program should ask for the
person’s name and assign a seat in the first class section (rows 1-3 (15 seats)). If the
person types 2, the program should ask for the person’s name and assign a seat in
economy section (rows 4-10 (35 seats)). Menu Option 3 displays the seating
allocation. The program should print a boarding pass indicating the person’s name
and seat number and weather it is in the first class or economy section of the plane
along with the price (R10 000 for first class and R5 000 for economy). Isle seats (A-J
seat number 2 and 3 are subject to a 10% discount) Use a 2-Dimensional array to
represent the seating chart of the plane. Initialize all the elements of the array to 0 to
indicate that all seats are empty. As each seat is assigned, set the corresponding
elements of the array to X to indicate that the seat is no longer available. When the
first class section is full, the program should ask the person if it is acceptable to be
placed in the economy section (and vice versa). If yes then make the appropriate
seat assignment. All seats in each section are assigned randomly unless the person
flying stipulates a specific seat. In the display view, show the percentage occupied of
the total flight (seats taken vs seats available) else if no seats are available then print
the message "Next Flight leaves in 3 hours." All flight information must be saved to a
file.
Last edited on
Wow, what a lot to do. first off do you know how to print and read from a file? #include <fstream>
You're just going to have to go at it bit by bit, it's all pretty well spelled out in the paragraph, you'll just have to use a bunch of if statements and a couple of while loops.
watch this guy's tutorial on multidimensional arrays if you don't understand menu option 3.
http://www.youtube.com/watch?v=B3iC40frU4M&feature=BFa&list=PLAE85DE8440AA6B83

he also goes into how to save to and read from files, but it's broken into several tutorials;
http://www.youtube.com/watch?v=HcONWqVyvlg&feature=BFa&list=PLAE85DE8440AA6B83
Topic archived. No new replies allowed.