So here's the question I've been assigned to and I seriously need help with the C++ coding. Please

Airline Seat Reservation System

A small airline has just purchased a computer for its new automated reservation system. You have been asked to program the new system. You are to write a new program to assign seats on each flight of the airline’s plane (maximum capacity: 50 seats). Assume that there are only 5 planes. Each plane has certain number of first class and economy seats.

Design your program with appropriate input. When a passenger wants to book a seat,

  1. -request for the flight schedule and determine the plane;
  2. -display the seat arrangement in the plane and indicate the available seats;
  3. -let the passenger select the seat (any two passengers cannot book the same seat); and
  4. -upon confirmation, print the boarding pass indicating the flight schedule and the seat number of the passenger.

Include iterations to accept more than one passenger for seat selection and print their boarding passes.

Have you learned about structs and classes?

Not yet, I think.

There are 5 airplanes with 50 seats. Your job is to create a user interface that will assign the seats in the airplanes. So first you should create the data structure for airplanes. If you aven't learned about structs/classes then just use arrays. Here is an example

const int MAX_AIRPLANES = 5;
const int MAX_SEATS_PER_AIRPLANE = 50;
bool airplaneSeats[MAX_AIRPLANES][MAX_SEATS_PER_AIRPLANE] = {false}; 

airplaneSeats[0][0] = true; //assign seat for airplane0 seat0
airplaneSeats[1][12] = true; //assign seat for airplane1 seat12

So now you should create some sort of while loop like so

bool isDone = false;
  int i = getInput();
  isDone = isUserFinished();

That above code isn't working but it should give you an idea on how to structure and start off.

oh thank you.
This definitely gave me some ideas. I'll try to do it and can I refer to you if I have any problem?

Sure no problem, I'll be glad to help. Just post here or private message me.

Hello there, I'm having a problem with the codes.
Can you please PM me since I can't PM anyone here.

Can you please PM me since I can't PM anyone here.

You can post though, so do that. It's actually preferred as more people will be able to help when the information is publicly available.

Be a part of the DaniWeb community

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