i am having trouble iwth this question

i am a little weak with classes that is why i cant complete this

any help would be greatly appreciated

Create a class for airline reservation. Assume that there are two aircraft models A, B. The class has following constants defined,

const int col_number = 4;
const int row_numberA = 20;
const int row_numberB = 50;

The number of seats in model A and B are given by (col_number*row_numberA)
and (col_number*row_numberB) respectively.

Depending on the aircraft model a two-dimensional array will be generated for seat assignment. Seats are numbered from left to right in each row, as shown below,

1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20

Each seat may be in one of the following two states,

0 indicates that a seat is available.
1 indicates that a seat has been assigned to a passenger.

Intially, all the seats are available.

Class should have the following public functions,

Constructor function // It should receive only the aircraft model as a parameter.
bool flightfull ( ) // This function determines if there are still available seats.
int get_available( ) // This function returns the number of available seats.
int get_assigned( ) // This function returns the number of assigned seats.
bool get_status(int a) // This function returns the status of seat with number a.
int assign_seats ( int b)
// The above function assigns b seats, the number of requested seats is always less than or equal to 4. The requested seats must be consecutive and in the same row. The first set of seats satisfying the request will be assigned. If assignment is successful, the function returns the number of the first seat in the assignment, otherwise it returns zero. Example, if for the request, assign_seats(3)
the system assigns seats 14, 15, 16, then the function should return 14.


Write the implementation of this class as well as test it with a driver program.

You must attempt something before we help you out.

Paste the code which you have written till now.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.