I am a novice user and am proposing to do a project on airline reservation system in C++ as a part of class. This is something I myself have proposed. I have started to design the classes and need some help.
So far I have only created 2 basic classes:
// Class: Flight
class Flight
{
public:
private:
string flight_id;
int capacity_economy;
int capacity_firstclass;
int day;
int mon;
string source;
string destination;
};
// Class: Passenger
class Passenger
{
public:
private:
string first_name;
string last_name;
string address1;
string address2;
string city;
string state;
int travel_day;
int travel_month;
string source;
string destination;
int seatnumber;
string flight_id;
};
I have not yet defined the member functions. To start with I have the following questions.
The goal is to achieve the following
- add new flights, delete existing flights, view details about a flight
- make a reservation, cancel reservation, view a reservation details
- Store all data in flat files (not in any database)
Questions:
- Do I need to create any other class to keep track of different flights or I should keep creating new instances of the Flight class and track it in my main program?
- Any suggestions/pointers in the direction to proceed, I mean any helper classes I need to use that may make programming this project easier?
Thanks
k007