Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

Students also viewed these Databases questions

Question

2. describe how to send messages more effectively,

Answered: 1 week ago