Question: Using decision statements (if statements) and logical operators only , create a Java application in NetBeans called Lab03 that asked the end user: Please enter

Using decision statements (if statements) and logical operators only, create a Java application in NetBeans called Lab03 that asked the end user:

Using decision statements (if statements) and logical operators only, create a Java

"Please enter an integer between 0-99:" and "Next, enter another integer between 0-99:" The program will reject any entries that are less than 0 and greater than 99. If there are two incorrect entries per entry request, the program will end (use the "return;" statement). The program will then generate three random integers within that range. Use the following formula: integer = min + (int) (Math.random() * ((max - min) + 1)); The program will then sort them in ascending order using decision statements and output them to the console in ascending order on separate lines. Here's the pseudocode: if integerl > integer2, then swap the values. Then, if integer2 > integer3, swap the values. Then, if integerl > integer2 then swap the values. You will need to declare a "hold" variable to hold one of these integers while you swap the values. Next to each integer will be "even" or "odd", depending on the value of the integer. Be sure to test all combinations of random small, medium, and large integers: SML (for example: 7 8 9) SLM (for example: 7 9 8) MSL (for example: 8 7 9) MLS (for example: 89 7) LSM (for example: 9 7 8) LMS (for example: 9 8 7) Finally, calculate the sum, product, and quotient (integerl / integer2 / integer3) of the three integers and put them to the console. Be sure to check all calculations to make sure they are accurate! Sample console output: Run with incorrect entries: run: Please enter an integer between 0-99:-1 Outside range. Please enter an integer between 0-99:100 Outside range. Program ending. Run with correct entries: Outside range. Please enter an integer between 0-99:80 Next, please enter another integer between 0-99: 100 Outside range. Please enter another integer between 0-99:20 The range begins at 20 and ends at 80 Three sorted random integers between 20 and 80 are: 21 Odd 48 Even 80 Even Sum = 149 Product = 80640

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!