Question: The following question is for Advanced Object-Oriented. Please do the following question as instructed by the information. Keep it as simple as possible. The following

The following question is for Advanced Object-Oriented. Please do the following question as instructed by the information. Keep it as simple as possible.

The following instructions for this program:

Write a function with three parameters: the tuition of this year, the increase rate per year, and the amount of a future tuition.

The return value of the function is the number of years that the tuition will increase to the future tuition. The function just does calculation, cannot have cout statements.

int predictTuition(double currentTuition, double rate, double futureTuition)

Call this function in the main function with the three arguments provided by user's inputs, print the return value of the function and the first argument sent to the function.

A second function with a different header but the same function body:

int predictTuitionByReference(double& currentTuition, double rate, double futureTuition)

Call the second function in the main function with the same inputs, print the return value of the function and the first argument sent to the function.

==========================================================================

Keep it simple, no need for advance codes. Remember to use the constant reference method in this program. This is all done in Visual Studio 2022 C++.

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 Databases Questions!