Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Sample Output: Thank you :) Exercise We are going to create a very simple English to Spanish translator. The translator will ask the user for:
Sample Output:
Thank you :)
Exercise We are going to create a very simple English to Spanish translator. The translator will ask the user for: 1. A non-negative number 2. An animal type The translator will then output the Spanish translation of the user's query. For full credit, your translator must support all combinations of the following numbers and animals: 1. Copy the contents of Lab3.java into a new file called exactly Lab3.java in your Cloud Shell. 2. The code already creates a Scanner and asks the user for their input. It is your job to use the values in num and animal within a series of if, else if, and else statements to figure out the proper Spanish translation. 3. Once you get the translation, make sure to print it outl 4. See the sample output on the next page for reference. Your program should run just like mine! - You can assume the user will always type in either 0, 1, or 2 for the number and "dog", "wolf", or "fish" for the animal. - If you wanted to add more numbers or more animals, is there an easier way to organize the code? Perhaps one if/else if block to get the spanish number, and one iffelse if block to get the spanish animal? - How would you go about adding a feminine animal, like una rana ("a frog")? If you have time, I encourage you to try itStep 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