• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need Help Getting Started With Project

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will be creating: a UML for the Hamburger Class, Java code for the Hamburger class and then the “driver” program.

Hamburger Class:  contains the following attributes/properties:
meatType: can be: beef, turkey, or veggie with beef as the default
​numberOfPatties: choice of: 1, 2, or 3.
​​the cost of a single burger is 5.99, each additional patty is $1.50
​type of bun: sesame-seed, whole-wheat, white, pretzel, multi-grain, traditional(Kaiser), brioche
​howCooked: choice of: well, medium, medium-rare, or rare
standardToppingList:​a list of the Standard toppings at no extra cost
​​that would be: tomato, lettuce, pickles, cucumbers, onion (white)
standardSauceList; a list of the Standard sauces at no extra cost
​​that would be: mustard, Dijon mustard, ketchup, mayonnaise, or hot sauce
cheeseToppingList; Choices of Cheese: American, Cheddar, or Mozzarella
counterT: for the number of cheese toppings
​costOfCheeseToppings: Cost is $1.00 for each
deluxeToppingList: a list of toppings at an extra cost,
that would be: red onion, bacon,  sautéed onions, sriracha sauce, or jalapenos
​counterD: for the number of deluxe toppings
costOfDeluxeToppings: 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 cooked medium 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: beef, 1 patty, cooked medium, on a sesame-seed bun with no toppings.

Your program will display the entire order.
Your program should calculate: sub-total amount, amount of tax (8.625%) AS A CONSTANT, and grand total. The money output should have both a $ and 2 decimal places.
Remember to include internal documentation.
 
Saloon Keeper
Posts: 10705
86
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows ChatGPT
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What have you done so far? Where are you stuck?
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch too.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic