Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CIS 2 2 B Lab 1 Itty Bitty Airfreight ( IBA ) 5 0 0 Points Topics: Functions struct Pass by Reference New and Delete
CIS B Lab Itty Bitty Airfreight IBA
Points
Topics:
Functions
struct
Pass by Reference
New and Delete
The anti AI constraints:
Any C terms, constructs andor methodologies covered in CIS A 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 and 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. eg AYF, PAG and so on
uldid Unit identifier, a string. Container or Pallet abbreviation five digits airline code; our ID code is
IB eg AYFIB
air Aircraft type, an integer. Ours is a
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, eg 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 AYFIB
Aircraft
Weight 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, eg FlintstoneFredlabcpp substituting your name
for Freds of course. Remember, late labs lose points. C
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started