subject
Computers and Technology, 25.02.2021 17:50 yorylee

Type the program's output// "New" means new compared to previous level#include using namespace std;class InchSize {public:InchSize(int wholeInches = 0, int sixteenths = 0);void Print() const;InchSize operator+(InchSize rhs);InchSize operator+(int sixteenthsOfInch);private:int inches;int sixteenths;};InchSize InchSize::operator+(InchSize rhs) {InchSize totalSize;totalSize. inches = inches + rhs. inches;totalSize. sixteenths = sixteenths + rhs. sixteenths;// If sixteenths is greater than an inch, carry 1 to inches. if (totalSize. sixteenths >= 16) {totalSize. inches += 1;totalSize. sixteenths -= 16;}return totalSize;}// New: Overloaded + operator adding integers. InchSize InchSize::operator+(int sixteenthsOfInch) {InchSize totalSize;totalSize. inches = inches;totalSize. sixteenths = sixteenths + sixteenthsOfInch;// While sixteenths is greater than an inch, carry to inches. while (totalSize. sixteenths >= 16) {totalSize. inches += 1;totalSize. sixteenths -= 16;}return totalSize;}InchSize::InchSize(int wholeInches, int sixteenthsOfInch) {inches = wholeInches;sixteenths = sixteenthsOfInch;}void InchSize::Print() const {cout << inches << " " << sixteenths << "/16 inches" << endl;}int main() {InchSize size1(4, 13);InchSize size2(3, 11);InchSize sumSize;InchSize totalSize;sumSize = size1 + size2;totalSize = sumSize + 18;totalSize. Print();return 0; }

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Your company has 1,500 desktop computers running windows 7. you want to upgrade them to windows 10. which type of microsoft license would be best suited in this situation?
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Which boolean operator enables you to exclude a search term? a} not b} and c} or d} plus
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
Answer these and get 40 points and brainliest
Answers: 1
You know the right answer?
Type the program's output// "New" means new compared to previous level#include using namespace std;c...
Questions
Questions on the website: 13722361