Question: Write a Java program. Suppose a keypad on a commercial convection oven is used to enter a desired baking temperature and is arranged like the

Write a Java program. Suppose a keypad on a commercial convection oven is used to enter a desired baking temperature and is arranged like the digits on a phone. 1 2 3 4 5 6 7 8 9 0 Unfortunately, the circuitry is damaged and the digits in the leftmost column no longer function. In other words, the digits 1, 4, and 7 do not work. If a recipe calls for a temperature that cant be entered, then you would like to substitute a temperature that can be entered. Write a program that inputs a desired temperature. The temperature must be between 0 and 999 degrees. If the desired temperature does not contain 1, 4, or 7, then output the desired temperature. Otherwise, compute the next largest and the next smallest temperature that does not contain 1, 4, or 7 and output both. Keep doing this until a sentinel of 0 is entered. the first temperature entered could be a sentinel, however the sentinel will not be entered after an invalid temperature (must be a good temperature between an invalid temperature and the sentinel) name your file badKeyBoard (or it will not be graded), you can use for loop, while and do loop. use nothing beyond chapter 4 of Building Java Programs 4th Edition. __________________ with output: 1) Please enter temperature setting: -230 2) INVALID TEMPERATURE 3) Please re-enter temperature setting: 350 4) The temperature will be set to 350. 5) Please enter temperature setting: 375 6) The keypad circuitry is not working properly. 7) The temperature setting of 375 does not work. 8) The next smallest temperature is 369. 9) and the next largest temperature is 380. 10)Please enter temperature setting: 450 11) The keypad circuitry is not working properly. 12) The temperature setting of 450 does not work. 13) The next smallest temperature is 399. 14) and the next largest temperature is 500. 15) Please enter temperature setting: 0

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!