Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

COSC 1430 Fall 2017 Group Assignment3 Instructions In this Group Assignment 3, you will need create a flight booking program with several functionalities (booking seat,

image text in transcribedimage text in transcribedimage text in transcribed

COSC 1430 Fall 2017 Group Assignment3 Instructions In this Group Assignment 3, you will need create a flight booking program with several functionalities (booking seat, clear a seat, check a seat, display all seats, etc ). You will need to create an object of class Plane named "COsc1430". Inside the plane, there will be two sections of seats first class, and economy. Each should be created as double-dimensional arrays of type Seat. Then, with a loop, ask user to choose an option from a list of menu options (Book a Seat, Check a Seat, Display all Seats, Clear a Seat, Empty all Seats and Exit). Each menu option should be numbered (1 -6), with Book a Seat being 1, and Exit being 6. The user should be able to select the corresponding menu option by entering just the number. When the user chooses to exit, clear all data of the seats and plane, and terminate the program In your program, you will need three files: main.cpp, Plane.h, Plane.cpp. Please note that we expect yoiu to separate your declarations and implementations (See the Car header/class in HW3 for an example). Plane.h/Plane.cpp A Struct Seat that contains the following: o char status (-if the seat is empty, x if the seat is booked) o bool isBooked (true if seat is booked, false if available) -A Class Plane that contains the following: o Private: - Pointer variable SeatfirstClass; - Pointer variable Seat economy; - int firstClassRows, firstClassCols, econRows, econCols; o Public: . Default Constructor: Ask for num of rows and cols of both firstClass and economyfusing cin) . Call the overloaded constructor to make the double dimensional arrays for firstClass and economy Store all the row and col data into the private variables. Initialize the double dimensional arrays for firstClass and economy . . ' displaySeats function Print (formatted neatly) all the seats in correct order (both firstClass and economy) The user should be able to tell from the display which seats are available and which are booked . . . bookSeat function ask whether a user wants a seat in firstClass or economy COSC 1430 Fall 2017 Group Assignment3 Instructions In this Group Assignment 3, you will need create a flight booking program with several functionalities (booking seat, clear a seat, check a seat, display all seats, etc ). You will need to create an object of class Plane named "COsc1430". Inside the plane, there will be two sections of seats first class, and economy. Each should be created as double-dimensional arrays of type Seat. Then, with a loop, ask user to choose an option from a list of menu options (Book a Seat, Check a Seat, Display all Seats, Clear a Seat, Empty all Seats and Exit). Each menu option should be numbered (1 -6), with Book a Seat being 1, and Exit being 6. The user should be able to select the corresponding menu option by entering just the number. When the user chooses to exit, clear all data of the seats and plane, and terminate the program In your program, you will need three files: main.cpp, Plane.h, Plane.cpp. Please note that we expect yoiu to separate your declarations and implementations (See the Car header/class in HW3 for an example). Plane.h/Plane.cpp A Struct Seat that contains the following: o char status (-if the seat is empty, x if the seat is booked) o bool isBooked (true if seat is booked, false if available) -A Class Plane that contains the following: o Private: - Pointer variable SeatfirstClass; - Pointer variable Seat economy; - int firstClassRows, firstClassCols, econRows, econCols; o Public: . Default Constructor: Ask for num of rows and cols of both firstClass and economyfusing cin) . Call the overloaded constructor to make the double dimensional arrays for firstClass and economy Store all the row and col data into the private variables. Initialize the double dimensional arrays for firstClass and economy . . ' displaySeats function Print (formatted neatly) all the seats in correct order (both firstClass and economy) The user should be able to tell from the display which seats are available and which are booked . . . bookSeat function ask whether a user wants a seat in firstClass or economy

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

3. What might you have done differently?

Answered: 1 week ago

Question

Why is the principle of matching so important?

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago