Hi, so I'm working on a function (VISUAL BASIC) that calculates tuition and the function should have an input
parameter variable defined, which represents the number of years for which the tuition is calculated. The requirement asks that the projected tuition amounts for the next n years should be printed out for each year. Therefore, I should call the calculate tuition function in a loop by providing the number of years ranging from 1 to n, which is the user input from the total years textbox but I'm not sure how.
(1) The class has a function that calculates the projected tuition amount using the following formula:
Projected tuition in the nth year = current tuition * (1+0.05)n
This is the code I have so far but I know I need a loop statement in there.
Public Overridable Function projectedTuition() As Double
Return Math.Round((currentTuition * (1 + 0.05) ^ totalYears), 2, MidpointRounding.AwayFromZero)
Here is the Required Method implementation to calculate the Projected Tuition amount Public Overridable... View the full answer