1. Engineering
  2. Computer Science
  3. please help create code with no errors if possible thank...

Question: please help create code with no errors if possible thank...

Question details


Overview : In this module, you have studied how to use conditionals and logical structures to create branches or “forks in the code.” In Stepping Stone Lab Three , you will put this emerging knowledge into practice by developing a branching structure for the recipe manager program.

Prompt : In Stepping Stone Three, you will write a short application that uses condit ionals to create a “forked” branching structure for the recipe manager.

Whenever a program accepts user input, it is best practice to be sure the input is what you as the programmer exp ect. As you continue to develop the recipe manager, you wi ll need to b e able to val idate user input and ensure that the user enter s values that are valid. In this l ab, you will write a short program that first, tests th at the input is numerical, then checks that the number is within a specific range, and checks that the maximum number of cups of our main ingredient is 100 and that the minimum number of cups is 1.

This application uses the Scanner class to accept a number be tween 1 and 100 from the user. The Scanner class is useful for parsing primit ive values, including numbers.

Specifically, you will create a branching structure that leads to the following output:

If the number entered is between 1 and 100 (inclusive), the application will display a message that says, “Good job! The numb er you entered is___.”

However, if the number entered is not between 1 and 100 (inclusive), an error message will be displayed to inform the user that the entry does not fit the expected range: “The number entered was not between 1 and 100!”

Guidelines for Submission: This assignment should be submitted as a Java file.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution