Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Utilizing your Lab 2 code as a starting point, move both the input and output functions declarations outside the class. They will no longer be

Utilizing your Lab 2 code as a starting point, move both the input and output functions declarations outside the class. They will no longer be able to directly access your private data (you'll need to use both mutators and accessors for private data access).
We have added a new load type, Combo Flat. Your code will need to handle this as a string. Combo Flat abbreviations for the 737 are CFE, CFK and CFM.
Create your objects on 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.
Add a copy constructor.
Create an object on the stack with the following information (or appropriate data of your choice):Copy the object using a copy constructor. Output the contents of both objects. Your code must include both the friend function and the copy constructor.
Your code will be tested with both pounds and kilograms as inputs. Submit your .cpp file via Canvas. Remember, late labs lose points.
image text in transcribed

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

How To Build A Million Dollar Database

Authors: Michelle Bergquist

1st Edition

0615246842, 978-0615246840

More Books

Students also viewed these Databases questions