Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question: Today you are commissioned to write a Java program that will prompt for and read 3 integer values as coffee, burger, and fries that

Question: Today you are commissioned to write a Java program that will prompt for and read 3 integer values as coffee, burger, and fries that are entered by the user and decides whether the order consists of two types of combos, i.e., trio combo and burger combo. One trio combo contains one burger, one fries and one coffee. One burger combo contains one burger and one fries. The program first tries to decide whether there are any trio combos based on the order items, then whether there are enough remaining order items to form burger combos. Note that an order may belong to more than one of the categories below. Be sure to use the same format and wording as in the sample runs in the table below.

1. If the order contains 0 coffee, 0 burger or 0 fries, then there is no way to form a trio combo, display No trio combos from this order!.

2. If the order contains 0 coffee, but does contain some burgers and some fries, display Only burger combos from this order!.

3. If the order contains 0 burger or 0 fries, then there is no way to form burger combo, so display No burger combos from this order!.

4. For the orders with at least one item from each category, both trio combo and burger combo may be found, if there are still remaining burgers and fries after forming trio combos as many as possible, display This order contains some trio combos and some burger combos!, otherwise display Only trio combos from this order!.

5. The box below illustrates how your program should behave and appear. REMEMBER in the output: is a space and is a new line. Text in green is user input

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

Accounting For Real Estate Transactions

Authors: Maria K. Davis

2nd Edition

0470603380, 978-0470603383

Students also viewed these Databases questions