Current location - Recipe Complete Network - Catering franchise - Friend, ask for help with a java problem, automatic ordering system
Friend, ask for help with a java problem, automatic ordering system

the above four dishes are represented by four categories, for example, A, B, C and D represent green vegetables, fried rice, soup and seafood, and each category has a value attribute, double type, which is used to represent the unit price of dishes. When the bill is generated automatically, two boolean fields B1 and B2 are used to judge whether there are both C and D types. As long as there is C, set b1 as true, as long as there is b2 as true. When b1 and b2 are both true, soup and seafood discounts are calculated. The important thing is that instance of is needed to judge the object type.