Question: Type the program's output #include using namespace std; class InchSize { public: InchSize ( int wholeInches = 0 , int sixteenths = 0 ) ;
Type the program's output
#include using namespace std; class InchSize public: InchSizeint wholeInches int sixteenths ; void Print const; InchSize operatorInchSize rhs; private: int inches; int sixteenths; ; InchSize InchSize::operatorInchSize rhs InchSize totalSize; totalSize.inches inches rhsinches; totalSize.sixteenths sixteenths rhssixteenths; If sixteenths is greater than an inch, carry to inches. if totalSizesixteenths totalSize.inches ; totalSize.sixteenths ; return totalSize; InchSize::InchSizeint wholeInches, int sixteenthsOfInch inches wholeInches; sixteenths sixteenthsOfInch; void InchSize::Print const cout inches sixteenths inches" endl; int main InchSize size; InchSize size; InchSize sumSize; sumSize size size; sumSize.Print; return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
