+ 1

Code to serve burger menu

Im trying to create a code to serve different menu of hamburgers who can me figure it out. public class Hamburger { public class rolltype { class Basic_meal{ private int cheese=5; private int lettuce=5; private int cabbage=5; private int pickles =5; public Basic_meal(int cheese, int lettuce, int cabbage, int pickles) { this.cheese = cheese; this.lettuce = lettuce; this.cabbage = cabbage; this.pickles = pickles; } Basic_meal (int cheese, int lettuce, int cabbage, int pickles){ System.out.println("the total is cheese" +cheese+ "lettuce" +lettuce+ "cabbage"+ cabbage+ "pickles" +pickles); return Basic_meal; } } class healthy_meal extends com.abello.Basic_meal { private int chicken =10 ; private int carrot= 7; public healthy_meal (int chicken, int carrot) { this.chicken = chicken; this.carrot = carrot; } } class Deluxe_meal extends com.abello.Basic_meal{ private int chips=10; private int drink= 5; public Deluxe_meal( int chips, int drink) { this.chips = chips; this.drink = drink; } Deluxe_meal() { } } } private int meat; private double price; public Harmburger(int meat, double price) { this.meat = meat; this.price = price; } }

6th Feb 2017, 8:36 PM
abdussamad
1 Odpowiedź
+ 1
I don't know exactly what you want to do, but at least you can get started with that code: https://code.sololearn.com/c183IevXT9r9/?ref=app
7th Feb 2017, 8:18 PM
Tashi N
Tashi N - avatar