Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java hamburger class and driver program: 1 - you will be creating a Uml for the hambrger class . 2 - java code for the

Java hamburger class and driver program:

1 - you will be creating a Uml for the hambrger class.

2 - java code for the hamburger class.

3- "driver" program.

Hambruger class contains the following attributes/ properties:

- meatType: can be : (beef, turkey, veggie) with beef as the default

- numberOfPatties: choice of 1, 2, or 3.

- the cost of the buger ($11.29 for 1 patty) , cost for extra patty $2.95

- type of bread: Kaiser/regular, sesame-seed, whole-wheat, white, or potato-roll

(howCooked; choice of : well, medium, medium-rare, or rare

the class did not care how it was cooked, so this attribute is removed)

- stantdardToppingList: a list of the Standard toppping at no extra cost that would be: tomato, lettuce, pickle, onion.

- counterT : for th number of standard toppings.

- standardSauceList: a list of the standard sauces at no extra cost would be: ketchup, yellow mustard, honey mustard, spicy brown mustard,

mayonnaise, chipotle mayonnaise, or BBQ

- counterS: for the number of standard sauces

- cheeseToppingList: choices of Cheese: American, Chedder, Pepper jack, Monterey jack, Swiss or Mozzarella

- numberOfCheeseToppings: another counter

- costOfCheeseTopping: cost is $1.00 for each.

- delauxToppingList: a list of topping at an extra cost for (red onions, bacon, banana peppers, and jalapenos)

- counterD: for the number of delaux toppings.

- costOfDeluxe Topping: Cost is $1.25 for each.

Methods: sets and gets for each of the attributes/properties. Include a no-argument constructor that defaults to: 1 beef patty on a sesame-seed bun, no toppings of any kind.

In your driver program: ask the user for their choices, if the input is invalid, then the program will use the default value.

Specifically: 1 beef patty on a sesame-seed bun, no toppings.

your program: will display the entire order. your program should calculate: sub-total amount, amount of tax (8.625%),

and grand total. The money output should have both a $ and 2 decimal places.

REMEMBER: to include internal documentation.

-------------------------------------------------------------------------------------------------------------------------------------------------

I HAD THE FOLLOWING DONE BUT NEED HELP WITH THE DRIVER PROGRAM :

package com.dq.thematrix.main.java.utilities;

public class Hamburger { double numberOfPatties; String meatType; double cost; String breadType; String stantdardToppingList[]; int counterT; String standardSauceList[]; int counterS; String cheeseToppingList[]; int numberOfCheeseToppings; int costOfCheeseTopping; String delauxToppingList[]; int counterD; int costOfDeluxe; public double getNumberOfPatties() { return numberOfPatties; }

public void setNumberOfPatties(double numberOfPatties) { this.numberOfPatties = numberOfPatties; }

public String getMeatType() { return meatType; }

public void setMeatType(String meatType) { this.meatType = meatType; }

public double getCost() { return cost; }

public void setCost(double cost) { this.cost = cost; }

public String getBreadType() { return breadType; }

public void setBreadType(String breadType) { this.breadType = breadType; }

public String[] getStantdardToppingList() { return stantdardToppingList; }

public void setStantdardToppingList(String[] stantdardToppingList) { this.stantdardToppingList = stantdardToppingList; }

public int getCounterT() { return counterT; }

public void setCounterT(int counterT) { this.counterT = counterT; }

public String[] getStandardSauceList() { return standardSauceList; }

public void setStandardSauceList(String[] standardSauceList) { this.standardSauceList = standardSauceList; }

public int getCounterS() { return counterS; }

public void setCounterS(int counterS) { this.counterS = counterS; }

public String[] getCheeseToppingList() { return cheeseToppingList; }

public void setCheeseToppingList(String[] cheeseToppingList) { this.cheeseToppingList = cheeseToppingList; }

public int getNumberOfCheeseToppings() { return numberOfCheeseToppings; }

public void setNumberOfCheeseToppings(int numberOfCheeseToppings) { this.numberOfCheeseToppings = numberOfCheeseToppings; }

public int getCostOfCheeseTopping() { return costOfCheeseTopping; }

public void setCostOfCheeseTopping(int costOfCheeseTopping) { this.costOfCheeseTopping = costOfCheeseTopping; }

public String[] getDelauxToppingList() { return delauxToppingList; }

public void setDelauxToppingList(String[] delauxToppingList) { this.delauxToppingList = delauxToppingList; }

public int getCounterD() { return counterD; }

public void setCounterD(int counterD) { this.counterD = counterD; }

public int getCostOfDeluxe() { return costOfDeluxe; }

public void setCostOfDeluxe(int costOfDeluxe) { this.costOfDeluxe = costOfDeluxe; } public Hamburger() { numberOfPatties=1; meatType="beef"; breadType="sesame-seed"; }

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago