Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Chrome Archivo Editar Ver Historial Favoritos Personas Ventana Ayuda 4.2 44. MoreX Music Seguro! https://learn.zybooks.com/zybook/STCHASCPT189Spring2018/chapter/4/section/4 ne, if Aplicaciones a . . A' . f g
Chrome Archivo Editar Ver Historial Favoritos Personas Ventana Ayuda 4.2 44. MoreX Music Seguro! https://learn.zybooks.com/zybook/STCHASCPT189Spring2018/chapter/4/section/4 ne, if Aplicaciones a . . A' . f g , r& www.google.com. D contenido destacado zyBooks My library > CPT 189 home>4.4: More while examples ezyBooks catalog @ HelpFAQ Angely Amaya import java.util.scanner Progran that has a conversation with the user uses; a if-e1see statements and a rendom number [sort of) to mix up the program. 8 responses./ public class Conversation f public static void main(String args) ( Scanner sc nr = new Scanner (System .in); int rananuno3; String userText; // Random number 0 to 3 /I User input - System-out.print1n"Te11 ne System . out,printin (''You can System.out.print("> "); soaething about yourself..); type \'Goodbye\" at anytime to quit. "); Tell me scmething about yourself You can type Goodbye at anytine to quit Im 26 years old Why do you say Im 26 years old."? userText senr . nextLine () ; = { randNum0-3 - userText, length () % 4; // "Randon' nur. %4 enBurea 0-3 while (!userText-equals("Goodbye")) Well was born 26 years ago I don't think that'a right > I am aure it is correct. Please explain further System.out.println(" Please explain further.n"); System , out . print ( *) ; System.out.printin( nwhy do you say: userTextn" System , out . print ( *) ; else if (randNuTO3 2) Goodbye System.out.println(" I don't think that's right.n" System , out . print ( *) ; It was nice talking with you System.out.printin( nwhat else can you share?hn") System , out . print ( *) ; else f System.out.println(" uh-oh, something went wrong. Try again.n")
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started