can anybody please help me make a program using text files for an airplane booking program with the following things included. Ticket number, Seat Number-A,B,C,D,E,F.(what i meant is like an airplane the seat number should be a number with any of the above letters and also the max limit is 50F if anything else is inserted then it should not be accepted)
Class of travel(ECONOMY,BUSINESS OR FIRST anything else should not be accepted.)
Also I have got a sample program of hotel management and I would be extremely grateful if you could make my program look like that with necessary changes.
void main_menu(); //to dispay the main menu
void add(); //to book a room
void display(); //to display the customer record
void rooms(); //to display alloted rooms
void edit(); //to edit the customer record
int check(int); //to check room status
void modify(int); //to modify the record
void delete_rec(int); //to delete the record
cout<<"\n\t\t\t\t* MAIN MENU *";
cout<<"\n\n\n\t\t\t1.Book A Room";
cout<<"\n\n\t\t\tEnter Your Choice: ";
case 1: add();
case 2: display();
case 3: rooms();
case 4: edit();
case 5: break;
cout<<"\n\t\t\tPress any key to continue....!!";
i have some suggestion for you, you're always free to ignore any:
the class called hotel might change its name to hotelRoom, as it describes one room of the hotel, you will then create another class called hotel, this one contains a private member ( vector<hotelRoom> book; ).
this might look like "re-structuring the whole program", but i think it's a better structure.
the hotel class shall manages the rooms inside it (make reservations, check for validity of a room, handle cash, ...etc), the hotelRoom class shall provide a good interface for manipulating its contents (default constructor for null initialization, setter functions ...etc).