Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c++ An airplane will carry passengers and their luggage, as well as the maximum number of cargo shipments they can carry on the same

In c++

An airplane will carry passengers and their luggage, as well as the maximum number of cargo shipments they can carry on the same flight. The number of passengers they can carry is limited by the number of seats on the plane. The amount of cargo they can carry is limited by the maximum takeoff weight of the plane. Constant values for the program are given below, as well as expected input and output. First determine the number of passengers and use the average weight constant per passenger below to figure how much weight they will add to the base plane weight. Once the passenger list is settled, the program will allow entry of multiple cargo shipment weights as long as the combined weight of base plane weight, passengers and cargo already loaded is less than the maximum takeoff weight.

restrictions:

no vectors, if needed dynamically allocate arrays.

Constants: average weight per passenger and their luggage 175 maximum passenger seats 143 base weight of airplane without passengers or cargo 130000 pounds maximum takeoff weight 175000 pounds

Input: number of passengers: integer cargo shipment weights: integer (multiple values)

Output: To the screen after a number of passengers entered: original weight -integer passenger weight added -integer new weight -integer

To the screen after each cargo shipment weight entered: current shipment weight -integer new weight -integer

To the screen at the end of the program: number of passengers -integer number of cargo shipments -integer for each cargo: cargo weight -integer total weight -integer maximum weight -integer

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions