Menu
support@nursinghomework.org
+1 714-215-3097

(Solved) : Turn Three Files Namely Yournamemoneycpp File File Contains Money Class Implementation You Q35582895

TURN IN THREE FILES:

Namely YourNameMoney.cpp file (this file contains only the Moneyclass implementation), YourNameProj4.cpp (this file contains onlymain function to use/test your money class), and YourNameMoney.hfile, by clicking on the above Proj4 link, then clicking on “BrowseMy Computer” button.

_____

Redo Practice Programs 1 from Chapter 11 , but this timedefine the Money ADT class in separate files for the interface andimplementation so that the implementation can be compiledseparately from any application program.

_____

Practice Program 1 From Chapter 11:

Modify the definition of the class Money shown in Display 11.8so that all of the following are added:

a. The operators <, <=, >, and >= have each beenoverloaded to apply to the type Money. (Hint: See Self-TestExercise 13.)

b. The following member function has been added to the classdefinition. (We show the function declaration as it should appearin the class definition. The definition of the function itself willinclude the qualifier Money::.)

Money percent(int percentFigure) const;

//Returns a percentage of the money amount inthe

//calling object. For example, if percentFigure is10,

//then the value returned is 10% of the amountof

//money represented by the callingobject.

For example, if purse is an object of type Money whose valuerepresents the amount $100.10, then the call

purse.percent(10);

returns 10% of $100.10; that is, it returns a value of typeMoney that represents the amount $10.01.

_____

Display 11.8

Leave a Reply

Your email address will not be published. Required fields are marked *