Question: Object-Oriented Programming I Programming Assignment 2 For this assignment you are to implement a program that computes the present value of a series of fixed

Object-Oriented Programming I

Programming Assignment 2

For this assignment you are to implement a program that computes the present value of a series of fixed annual payments over a specified number of years, based on a specified interest rate.

Your implementation should include the use of the following two functions with the indicatedprototypes.

1.double Power (double b, int e)

This function returns the value computed by raising the value indicated by the first parameterb(the base) to the power indicated by the second parametere(the exponent). The function implemented so that it allows any negative, positive, and zero-valued (integer) exponent value. A default value of 2 should be specified for the parameter that corresponds to the exponent.

2.double PresentValue (double payamt, double intrte, int trm)

where the first parameterpayamtis thePayment Amount, the second parameterintrteis theInterest Rate, expressed as (i.e., normalized to) a value between0and1, and the third parametertrmis theTermover which the payments are to be made. The function returns the present value computed using the formula:

Object-Oriented Programming IProgramming Assignment 2For this assignment you are to implement a

\f

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!