Software Design Using C++Review of Functions and ParametersAnswering the QuestionYour rewrite of the CalculateCost function was as follows. In addition, you selected Answer D, also shown below, for your rewrite of the Results function. Although this version correctly sets up TotalCost as a reference parameter so as to send the updated value back, it fails to call CalculateCost correctly. Note that CalculateCost is supposed to have 2 parameters, not 3, and returns a value in the function name (which the code inside of Results has ignored). 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++ |