Lab 3.1 Create your objects in the stack (not on the heap). Add a friend function, kilotopound,...

50.1K

Verified Solution

Question

Programming

Lab 3.1

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

There are 2.2 pounds in one kilogram.

Create an object on the stack with the followinginformation:

   

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 thecontents of both objects.

Answer & Explanation Solved by verified expert
4.4 Ratings (615 Votes)
Here is the solution to above problem in C PLEASEGIVE A THUMBS UPRead    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students