| |
|
|
Job Summary:
|
| |
| Job Type: |
Project |
| Budget: |
$ 20-100 |
| Required
Skills: |
|
| Attached
Files: |
attachments.zip
|
| |
|
| Status: |
Work Performed (selected user nightmares)
|
| |
|
|
|
Buyer Summary:
|
| |
| Username: |
|
| Feedback Score: |
        
2
reviews
|
| Award Reliability: |
3 posted 3 paid |
| |
|
| Location: |
Alexandria, VA, United States
|
| Member Since: |
March 9, 2010 |
| |
|
|
|
| Invited Users: |
There are no invited users
|
Description
Three different programs utilizing the code I attach
1.) Redefine CDAccount from attachment #1 file so that it is a class rather than a structure. Use the same member variables as in the attachment but make them private. Include member functions for each of the following: one to return the initial balance, one to return the balance at maturity, one to return the interest rate and one to return the term. Include a constructor that sets all of the member variables to any specified values, as well as a default constructor. Also, include an input member function with one formal parameter of type istream and an output member function with one formal parameter of type ostream. Embed your class definition in a test program.
2.) Redo your definition of the class CDAccount from the previous project so that it has the same interface but a different implementation. The new implementation is in many ways similar to the second implementation for the class BankAccount given in attachment #2. Your new implementation for the class CDAccount will record the balance as two values of type int: one for the dollars and one for the cents. The member variable for the interest rate as a fraction rather than as a percentage. For example, and interest rate of 4.3% will be stored as the value 0.043 of type double. Store the term in the same way as in attachment #1.
3.) Modify the definition of the class Money shown in attachment #3 so that all of the following are added:
a. The operators <, <=, >, and >= have each been overloaded to apply the type Money. 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 percent_figure) const; //returns a percentage of the money amount in the calling object. For example, //if the percent_figure is 10, the the value will be returned 10% of the amount //of money represented by the calling object.
For example, if the purse is an object of type Money whose value represents the amount
| | | | |