View the step-by-step solution to:

Question

# 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)

End Function

End Class

Thanks

Here is the Required Method implementation to calculate the Projected Tuition amount Public Overridable... View the full answer

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents