15)
option (a) is not correct choice because maintaining separate
classes for each item is not good since multiple instances need to
create every time.
option (b) is good choice but not correct since here common
property for food item and drinks are missing.
option (c) is correct answer since here maintaining common property
as name in Item class and then extending foodItem and DrinkItem to
separate them.
option (d) is not correct since again same explanation. missing
common property.
option (e) keeping all items as instances will reduce flexibility
to create and use them.
So finally option (c) is best chioce
----------------------------------------------------------------------------------------------------------------------------------------------------------------
HERE IS THE DESIGN SAMPLE
class Item {
String name;
double price;
}
class FoodItem extends Item {
int size;
FoodItem (String name,double price,int size){
super(name,price);
this.size = size;
}
}
class DrinkItem extends Item {
int ounces;
FoodItem (String name,double price,int ounces){
super(name,price);
this.ounces = ounces;
}
}
Questions 15 and 16 refer to the following design problem. You are to create a software...
Using C++ Mr. Manager wants you to process orders for the Fast Greasy Food Shop. His customers have a few choices in what they order. The can order a hamburger for 1.00. It they want cheese it is an addition .50 and if they want bacon the additional amount is .75. They can also order a small or large drink for 1.10 and 1.60 respectively and small or large French fries for 1.20 or 1.75 respectively. The user can only...
Question 1 The following excerpt provide a description of the strategy used by fast food chains in the U.S. to raise its sales A war is breaking out between McDonald's, Burger King, and Wendy'sand that's great news for consumers America's biggest fast-food chains are engaging in a new price war Wendy's just started offering a "4 for $4" meal that includes a junior bacon cheeseburger, four chicken nuggets, small fries, and a drink, all priced at $4. The Wendy's deal...
*****************USING JAVA AND JAVA FX **************
PLEASE READ THE INSTRUCTIONS BEFORE YOU GO AND DO IT SOME OTHER
WAY...
home / study / engineering / computer science / questions and
answers / *****in java & java fx***** a restaurant wants
...
Your question has been answered! Rate it below.
Let us know if you got a helpful answer.
Question
*****IN JAVA & JAVA FX*****
A restaurant wants an application that calculates a table’s
bill.
The design should include:
Group Boxes,...
I NEED HELP with this. please create a UML diagram. I need a simple code to solve the problem. The ADT Bag is a group of items, much like what you might have with a bag of groceries. In a software development cycle, specification, design, implementation, test/debug, and documentation are typical activities. The details are provided in the rest of the document. ADT Bag Specification: (Note: You should not change the names of the operations in your program. This should...
Problem 2: Point of Sale System The McDowell Restaurant chain has asked you to write a menu program for their new Fast-food service machines. Your program already prints the following menu like this: ********************************************************************** McDowell’s Restaurant ********************************************************************** Make your selection from the menu below: 1. Regular Hamburger $1.50 2. Regular Cheeseburger $1.75 3. Fish Sandwich $2.50 4. Half-pounder with cheese $2.75 5. French Fries $0.99 6. Large Soft Drink $1.25 *********************************************************************** Select 1, 2, 3, 4, 5, or 6 -----...
DESCRIPTION You have to design an e-commerce shopping cart. These require classes Item, Electronics, Food, Dress, Cart and Main. ITEM CLASS Your Item class should contain: Attributes (protected) String name - name of the Item double price - price of the item Methods (public) void setName(String n) - sets the name of Item void setPrice(double p) - sets the price of Item String getName() - retrieves name double getPrice() - retrieves price String formattedOutput() returns a string containing detail of...
Project overview: Create a java graphics program that displays an order menu and bill from a Sandwich shop, or any other establishment you prefer. In this program the design is left up to the programmer however good object oriented design is required. Below are two images that should be used to assist in development of your program. Items are selected on the Order Calculator and the Message window that displays the Subtotal, Tax and Total is displayed when the Calculate...
Please write this code in JAVA lang., thank you! Your spouse's cousin's nephew's dog's trainer's best friend owns a restaurant. That person is very bad at math and recently discovered that most customers have been significantly undercharged for meals. You have been approached to create a computer program that will accurately calculate bills for each customer. Kids, under 5, eat free. Teens and seniors get a 25% discount. Also, Food and beverage is taxed at 5%. No tax for anything...
Please write this code in JAVA lang., thank you! Your spouse's cousin's nephew's dog's trainer's best friend owns a restaurant. That person is very bad at math and recently discovered that most customers have been significantly undercharged for meals. You have been approached to create a computer program that will accurately calculate bills for each customer. Kids, under 5, eat free. Teens and seniors get a 25% discount. Also, Food and beverage is taxed at 5%. No tax for anything...
eclipse java Oxygen
Design a self-service fast food menu. Name your class FastFood. Create a test class based on the examples from chapter 4. Create a program to do the following. When you set up the program, save the java file to a folder named Chapter 04 Program. Console Welcome to the fast food order menu How may I help you Please place your order: НННН Please place your order Your order Your subtotal: $e.00 $e.00 Continue? (y/n): Y Please...