Consider the Menu class in Worked Example 8.1. What is displayed when the following calls are executed?

Question:

Consider the Menu class in Worked Example 8.1. What is displayed when the following calls are executed?

Menu simpleMenu = new Menu();
simpleMenu.addOption("Ok");
simpleMenu.addOption("Cancel");
int response = simpleMenu.getInput();

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

Step by Step Answer:

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