Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*** in C++ please and 3.1 and 3.2 are part of the same question but should be different codes please*** Lab 3.1 Create your objects

*** in C++ please and 3.1 and 3.2 are part of the same question but should be different codes please***

Lab 3.1

Create your objects in the stack (not on the heap). Add a friend function, kilotopound, which will convert kilograms to pounds. Change your weight mutator to ask whether weight is input in kilograms or pounds. If it is kilograms, call the friend function kilotopound to convert it to pounds and return pounds.

There are 2.2 pounds in one kilogram.

Create an object on the stack with the following information:

uld Container

abbreviation - AYK

uldid AYK68943IB

aircraft - 737

weight 1654 Kilograms

destination PDX

Output the contents of your object.

-------------------------------------------------------------------------------------------------------------------------------------

Lab 3.2

Utilizing Lab 3.1 code, add a copy constructor.

Create an object on the stack using the following data:

uld Container

abbreviation - ABB

uldid ABB31545IB

aircraft - 737

weight 1156

destination BUR

Copy the first object using a copy constructor. Output the contents of both objects.

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

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions

Question

Prepare an ID card of the continent Antarctica?

Answered: 1 week ago

Question

What do you understand by Mendeleev's periodic table

Answered: 1 week ago

Question

2. Compare the sales and service departments at Auto World.

Answered: 1 week ago