Question: 3. 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

 3. Suppose you are writing a program that asks the user

3. 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!