Sale!

COSC6000 Homework 07

$30.00 $18.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (5 votes)

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.
4/23/2018 Homework 07
https://tulane.instructure.com/courses/2165899/assignments/13466511 2/2