The function printNow is not the only way to present information to the user during the running

Question:

The function printNow is not the only way to present information to the user during the running of a program. We might also use the function showInformation which takes a string as input, then displays it in a dialog box. Currently, our showRoom subfunctions presume that we will display the room information via printNow. If functions like showPorch returned a string with the description, then the function showRoom could either use printNow to display the room description or showInformation.

Rewrite the room showing functions to return a string, then modify showRoom to easily change between printing the room information and showing it in a dialog box.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: