Suppose you are writing a program that asks the user to give a yes-or-no response. Assume that
Question:
Suppose you are writing a program that asks the user to give a yes-or-no response. Assume that the program reads the user’s response into the Stringvariableresponse.
a. If response is yes or y, set the boolean variable accept to true; otherwise, set it to false.
b. How would you change the code so that it will also accept Yes and Y?
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Question Posted: