Question: Please use C++ Only! ------------------------------------------------------------------------------------------------ #include #include using namespace std; class Item { public: string uld; string abbreviation; string uldid; int aircraft; double weight; string
Please use C++ Only!

------------------------------------------------------------------------------------------------
#include
} Item(Item & i) { uld = i.uld; abbreviation= i.abbreviation; uldid=i.uldid; aircraft=i.aircraft; weight=i.weight; destination=i.destination; } void print() { cout
} friend bool operator ==(Item &,Item &); friend void kilotopound(Item ); }; bool operator ==(Item &a, Item &b){ if((a.abbreviation==b.abbreviation) && (a.uldid==b.uldid)){ return true; } else { return false; } } void kilotopound(Item I) { cout
Item I;
I.uld="Container"; I.uldid="ABB"; I.abbreviation="ABB315451B"; I.aircraft=737; I.weight=1156; I.destination="BUR";
Item I2(I);
I.print(); kilotopound(I); cout
return 0; }
------------------------------------------------------------------------------------------------
My data is public, needs to be private.
Please change public to private Data.
Lab 4.1 Utilizing the code from Lab 3.2, add an overloaded operator == which will be used to compare two objects to see if they are equal. For our purposes, two objects are equal if their abbreviation - and uldid are the same. You'll need to make your overloaded operator a friend of the Cargo class.' t Create a unit object and load it with this data: uld - Pallet abbreviation - PAG- uldid - PAG325971B+ aircraft - 7372 weight - 3321 Kilograms destination - SEA Make a copy of unit1 called unit2 utilizing a copy constructor. t Create a default unit3. Test with code like this in main: t if (unit1 == unit2) cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
