Answered step by step
Verified Expert Solution
Link Copied!

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 22B Lab 1 Itty Bitty Airfreight (IBA)
500 Points
Topics:
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 Freds, of course. Remember, late labs lose points. C++

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_2

Step: 3

blur-text-image_3

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

Students also viewed these Databases questions