[SOLVED] COSC6000 homework07

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon homework07-1s8m4x.zip (101.6 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (1 vote)

In HW5, we have developed a class called USLength that is an abstract data type (ADT) for a length. In this HW, we modify the class.

Divide your class code  into two parts:

USLength class header file USLength.h

USLength class implementation file USLength.cpp

Determine namespace name as you like. (ex. your name, your initial…) Define your USLength class under the namespace.

Add following overloaded operators.

operator + to compute (USLength object) + (USLength object) operator += to compute (USLength object) += (USLength object) operator * to compute (USLength object) * (int) operator * to compute (int) * (USLength object) operator / to compute (USLength object) / (int) operator *= to compute (USLength object) *= (int) operator /= to compute (USLength object) /= (int) operator < to evaluate (USLength object) < (USLength object) operator <= to evaluate (USLength object) <= (USLength object) operator > to evaluate (USLength object) > (USLength object) operator >= to evaluate (USLength object) >= (USLength object) operator == to evaluate (USLength object) == (USLength object) operator << to perform (ostream object) << (USLength object) Use call­by­referece for input arguments if possible.

Add “const” modifier for input arguments that are not modified in function body.

Add “const” modifier to member functions that do not change member variables.

Develop main.cpp to test your USLength class. You will have three files to upload.

  • homework07-1s8m4x.zip