Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

TURN IN THREE FILES: Namely YourNameMoney.cpp file (this file contains only the Money class implementation), YourNameProj4.cpp (this file contains only main function to use/test your

TURN IN THREE FILES:

Namely YourNameMoney.cpp file (this file contains only the Money class implementation), YourNameProj4.cpp (this file contains only main function to use/test your money class), and YourNameMoney.h file, by clicking on the above Proj4 link, then clicking on "Browse My Computer" button.

_____

Redo Practice Programs 1 from Chapter 11 , but this time define the Money ADT class in separate files for the interface and implementation so that the implementation can be compiled separately from any application program.

_____

Practice Program 1 From Chapter 11:

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

a. The operators , and >= have each been overloaded to apply to the type Money. (Hint: See Self-Test Exercise 13.)

b. The following member function has been added to the class definition. (We show the function declaration as it should appear in the class definition. The definition of the function itself will include the qualifier Money::.)

Money percent(int percentFigure) const;

//Returns a percentage of the money amount in the

//calling object. For example, if percentFigure is 10,

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

//money represented by the calling object.

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

purse.percent(10);

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

_____

Display 11.8

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions