-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.java
27 lines (20 loc) · 959 Bytes
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.company;
public class Main {
public static void main(String[] args) {
Hamburger hamburger = new Hamburger("Basic", "Sausage", 3.56,
"White");
double price = hamburger.itemizeHamburger();
hamburger.addHamburgerAddition1("Tomato", 0.27);
hamburger.addHamburgerAddition2("Lettuce", 0.75);
hamburger.addHamburgerAddition3("Cheese", 1.13);
System.out.println("Total Burger price is " + hamburger.itemizeHamburger());
HealthyBurger healthyBurger = new HealthyBurger("Bacon", 5.67);
healthyBurger.addHamburgerAddition1("Egg", 5.43);
healthyBurger.itemizeHamburger();
healthyBurger.addHealthAddition1("Lentils", 3.41);
System.out.println("Total healthy burger price is " + healthyBurger.itemizeHamburger());
DeluxeBurger db = new DeluxeBurger();
db.itemizeHamburger();
db.addHamburgerAddition1("Bad", 20.1);
}
}