Computer Science2212 Java Software Dev I Week 3 – Dialog Purpose: Practice selection/decision statements. Goal: Write a program that carries on a conversation with the user, asking questions...

Attached


Computer Science 2212 Java Software Dev I Week 3 – Dialog Purpose: Practice selection/decision statements. Goal: Write a program that carries on a conversation with the user, asking questions and responding with “intelligent” answers based on the input values. Write a program that will carry on a dialog with the user. Your program should begin by introducing itself and asking for the person’s name. (Use the person’s name throughout the program to personalize the dialog.) Then the program should ask a question that can be answered with a simple answer. Input the answer and then output an intelligent response. The computer response will depend on the answer given by the user. Your dialog should consist of at least 5 questions. After all five questions have been asked and the answers responded to, display a good-bye message. For example, after the program introduces itself, it might ask for the person’s shoe size. If the shoe size is less than 5, then the program might respond that they have dainty feet. If the shoe size is between 5 and 10, then the program might respond that the person is about average. If the shoe size is greater than 10, then the program might say something about what big feet they have. Here is an example of how the dialog might begin (user response in italics): Bonjour neighbor! What’s your name? Taz Well Taz, I hope that you are feeling fine today. I love conversing with folks about this, that and the other. How ‘bout I ask you a few questions to kinda break the ice? That’s a nice pair of feet you’ve got there. What size are they? 14 Shoowee! Now that’s a pair of stompers! Barefoot skiing must be easy with those sleds! That should give you the general idea. Your program must meet the following specifications: • Ask at least five questions, not counting “What’s your name?” • Three of the questions must have at least three possible responses (3+-branch decision). • At least one of the inputs must be numeric such that you are checking for a range of numbers. • At least one of the inputs must be a String. • The questions cannot all ask for the same kind of answer. For example, 5 questions that begin with “On a scale from 1 to 10…” • Use at least 1 switch statement. • You should output the name occasionally in the questions to make your dialog more personable. • Spelling/grammar counts! • Make sure your program is not case-sensitive. Your program should treat the inputs “yes”, “YeS”, “yEs”, and “YES” the same. The expectation is that your program compiles, includes identification comments at the top, and that the output exemplifies good grammar and spelling. If these expectations are not met, points will be deducted from your score.
Mar 28, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here