Question: please help Consider a set of input data organized as follows: The input begins with a single integer that indicates a number of investments followed


please help
Consider a set of input data organized as follows: The input begins with a single integer that indicates a number of investments followed by one line of data for each investment. Each investment contains three values: principle . rate . years original amount invested annual interest rate number of years of the life of the investment 1. Write the following functions FinalValue - This function accepts four parameters: an original principle, an annual interest rate, the frequency of compounding and the length of the investment (in years). FinalValue returns the final value of the investment. CompoundDaily - This function accepts three parameters: an original principle an annual interest rate, and the length of the investment (in years). CompoundDaily returns the final value of the investment if the interest is compounded daily. [You should simply call he function FinalValue with a compounding frequency of 365.1 CompoundMonthly - This function accepts three parameters: an original principle, an annual interest rate, and the length of the investment (in years). CompoundMonthly returns the final value of the investment if the interest is compounded daily. [You should simply call the function FinalValue with a compounding frequency of 12.) CompoundAnnually - This function accepts three parameters: an original principle, an annual interest rate, and the length of the investment (in years). CompoundaAnnually returns the final value of the investment if the interest is compounded daily. [You should simply call the function FinalWalue with a compounding f inalValue with a compounding frequency of 1.J 2. Create an external file on disk (called "filedat5") and key in the sample date below. Write a main program which does the following: Initialize (define and open the external file). Read the number of investment plans. For each investment plan, print the following: plan number (1, 2,..., etc.), principle, rate, years, total investment under three compounding strategies: annual, monthly, daily, percentage gain of daily over annual compounding. Consider a set of input data organized as follows: The input begins with a single integer that indicates a number of investments followed by one line of data for each investment. Each investment contains three values: principle . rate . years original amount invested annual interest rate number of years of the life of the investment 1. Write the following functions FinalValue - This function accepts four parameters: an original principle, an annual interest rate, the frequency of compounding and the length of the investment (in years). FinalValue returns the final value of the investment. CompoundDaily - This function accepts three parameters: an original principle an annual interest rate, and the length of the investment (in years). CompoundDaily returns the final value of the investment if the interest is compounded daily. [You should simply call he function FinalValue with a compounding frequency of 365.1 CompoundMonthly - This function accepts three parameters: an original principle, an annual interest rate, and the length of the investment (in years). CompoundMonthly returns the final value of the investment if the interest is compounded daily. [You should simply call the function FinalValue with a compounding frequency of 12.) CompoundAnnually - This function accepts three parameters: an original principle, an annual interest rate, and the length of the investment (in years). CompoundaAnnually returns the final value of the investment if the interest is compounded daily. [You should simply call the function FinalWalue with a compounding f inalValue with a compounding frequency of 1.J 2. Create an external file on disk (called "filedat5") and key in the sample date below. Write a main program which does the following: Initialize (define and open the external file). Read the number of investment plans. For each investment plan, print the following: plan number (1, 2,..., etc.), principle, rate, years, total investment under three compounding strategies: annual, monthly, daily, percentage gain of daily over annual compounding
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
