Question
Java code Restaurant - Daily Specials Purpose to practice Writing, debugging and running SWITCH/CASE logic in a Java program Use a nested IF statement Switch/Case
Java code
Restaurant - Daily Specials
Purpose to practice
Writing, debugging and running SWITCH/CASE logic in a Java program
Use a nested IF statement
Switch/Case statement
Use the toUppercase() method
Use showInputDialog()
Use .equalsIgnoreCase() for string comparisons
Input, Format and Output to the console
Problem Statement
Code a Java program to display the daily menu special for a restaurant.
Remember to backup your program before you begin each phase.
Phase 1
Use a showInputDialog() box to ask the user to enter a day of the week. Ex. Friday
Convert the text they enter into all uppercase
Use a SWITCH/CASE statement to evaluate the day
Display a special menu item and the price to the user (you can make one up for each day).
Hold the item price of in a variable, you will need this in phase 2.
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