Software Design Using C++Review of Functions and ParametersAnswering the QuestionYour rewrite of the CalculateCost function was as follows. Then you chose Answer B, also shown below, for your rewrite of the Results function. This is incorrect as it tries to call CalculateCost with 3 parameters when it is supposed to have only 2. In addition, CalculateCost returns its answer in the function name, but the function call inside of Results does not use the return value. Finally, note that TotalCost is not listed as a reference parameter and hence fails to send the updated value back. Go back and try this part again.
You can go back to the overall review listing: Review of Introductory Topics. Back to the main page for Software Design Using C++ |