The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I need help with this assignment! C++ program
Thank You!
A
Object-Oriented Programming IFall 2016CIS 4100Programming AssignmentFor this assignment you are to implement a program that computes the present value of a series offixed annual payments over a specified number of years, based on a specified interest rate.Your implementation should include the use of the following four functions with the indicatedprototypes.1.bool MoreData()This function asks the user if there is more data to be input. The function returnstruewhen the userresponds in the affirmative by inputting uppercase or lowercase “y,” andfalsewhen the userresponds in the negative by inputting uppercase or lowercase “n.” The function reprompts the userto enter a valid value if the response is anything but “y” or “n.”2.double Power (double, int)This function returns the value computed by raising the value indicated by the first parameter (thebase)to the power indicated by the second parameter (the exponent).The function should allownegative, positive, and zero-valued (integer) exponent values.3.doublePresentValue (double, double, int)where the first parameter is thePayment Amount, the second parameter is theInterest Rate,expressed as (i.e., normalized to) a value between0and1, and the third parameter is theTermoverwhich the payments are to be made. The function returns the present value computed using theformula: interestinterestamountpaymentvaluepresentterm11For example, the present value for an annual payment of $10,000 for 10 years at an interest rate of5% is $77,217.35.4.void ReadData (double&, int&, double&)This function is used to prompt for and obtain from the user data to be used for computing apresent value. The data consists of 3 values as follows.a)Payment Amount-The amount, in dollars and cents, paid out each year.b)Term-The whole number of years in which payments are made.c)Interest Rate-The interest rate expressed as a real number between0and100for which the present valuewill be computed.The data for the payment amount, term and interest rate are passed back to the calling programusing the three respective parameters.
Attachments:
-----------