Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Functions struct Pass by Reference New and Delete The anti AI constraints: Any C++ terms, constructs and/or methodologies covered in CIS 22A are available for

Functions
struct
Pass by Reference
New and Delete
The anti AI constraints:
Any C++ terms, constructs and/or methodologies covered in CIS 22A are available for your use.
You may only use additional C++ constructs or terms covered in lecture or zyBook (ebook) reading
assignments found in modules 1 and 2. Deviation from these constraints lose points.
Welcome to Itty Bitty Airfreight. We are a small, one airplane, local, airfreight company. We specialize
in freight charters, special handling and quick turnaround shipments. If you need something delivered in
the West, we are your solution. We do the smaller, local airports as well as the major airports.
What we need from you, the programmer, is the following:
Data input and output using a struct as follows:
uld - Unit type, a string. Either a container or pallet
abbr - abbreviation, a string. e.g. AYF, PAG and so on
uldid - Unit identifier, a string. Container or Pallet abbreviation + five digits + airline code; our ID code is
IB, e.g. AYF12345IB
air - Aircraft type, an integer. Ours is a 737.
weight - Weight: The weight, in pounds, of the loaded container or pallet. It is a double.
dest - Destination, a string. A three alpha character IATA string, e.g. MFR (Medford, OR), or PDX
(Portland, OR)
Prompt the user for the information above and store it in a struct on the heap (use new), then output
the data in a neat format.
Once your output is complete, delete your struct and terminate your program.
Your program MUST use at least three functions, including main.
Pass your struct to your functions using pass by reference.
Sample output might look like this:
Unit type Container
Unit abbreviation AYF
Unit ID AYF12345IB

 

 

Aircraft 737
Weight 1104 pounds
Destination SMF
You can set up your struct like this:
struct Cargo
{
string uld;
string abbr;
string uldid;
int air;
double wt;
string dest;
};
Submit your lab one using Canvas, submitting only your .cpp file. It is helpful to use a file
naming method showing your name, e.g. FlintstoneFredlab1.cpp, substituting your name
for Fred's, of course. Remember, late labs lose points.



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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Algorithms questions