@startuml classdiagram
!include commons.style

package original.api.general {

    interface Product{
        weight(): double
        price(): double
    }

    interface Product_With_Calorie100gr{
        calories100gr():double;
    }

    interface ProductAll extends Product,Product_With_Calorie100gr{
        calories() : double
    }

    enum SauceType {
        BURGER, BARBECUE, BEARNAISE
    }

    enum MeatType {
        BEEF, WHITEFISH
        + price(): double
    }

    class Cheddar implements ProductAll {
        - weight: double
        - BASE_PRICE: double = 4
        + this(weight: double)
        + weight(): double
        + price(): double
    }

    class DeepFriedOnions implements ProductAll {
        - weight: double
        - BASE_PRICE: double = 1.5
        + this(weight: double)
        + weight(): double
        + price(): double
    }

    class Tomato implements ProductAll {
        - weight: double
        - BASE_PRICE: double = 0.5
        + this(weight: double)
        + weight(): double
        + price(): double
    }

    class Sauce implements ProductAll {
        - weight: double
        - {static} BASE_PRICE: double = 1
        + this(type: SauceType, weight: double)
        + weight(): double
        + price(): double
    }
    Sauce *--> "-type" SauceType

    class Meat implements ProductAll {
        - weight: double
        + this(type: MeatType, weight: double)
        + weight(): double
        + price(): double
    }
    Meat *--> "-type" MeatType

    class Burger implements ProductAll {
        ~ name: string
        + this(name: string, items: List<ProductAll>)
        + weight(): double
        + price(): double
    }
    Burger *-> "~items *" ProductAll
}
@enduml
