[Solved] COSC6000 homework07

$25

File Name: COSC6000_homework07.zip
File Size: 178.98 KB

SKU: [Solved] COSC6000 homework07 Category: Tag:
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 callbyreferece 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.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] COSC6000 homework07
$25