Software engineering problem design a software that can be u
Software engineering problem:
design a software that can be used by different restaurants for coming up with the final price for each meal,
this software must take to account the price of the required materials for making the meal, price of getting those raw materials to the kitchen, and the percentage of profit that restaurant has in mind.
this software must have a sense of dynamic ness in the sense that each meal might have a different number of raw materials, might come from different places.
this software is going to go on a Computer, with a windows OS. can be written in the python/Java language.
please keep it readable,
thanks so much
Solution
public class Restaurant
{
public static void main(String[] args)
{
Map<String, Beverage> menu = new HashMap<String, Beverage>();
menu.put(\"Fried Rice\", new Beverage(\"Fried Rice\", new BigDecimal(5.50)));
menu.put(\"Chicken Rice\", new Beverage(\"Chicken Rice\", new BigDecimal(5.00)));
menu.put(\"Toast Bread\", new Beverage(\"Toast Bread\", new BigDecimal(2.00)));
menu.put(\"Mixed Rice\", new Beverage(\"Mixed Rice\", new BigDecimal(3.80)));
Order order1 = new Order();
order1.add(menu.get(\"Fried Rice\"), 2);
order1.add(menu.get(\"Toast Bread\"), 3);
order1.add(menu.get(\"Mixed Rice\"), 1);
System.out.println(\"Total for order 1: \" + order1.getTotal());
Order order2 = new Order();
order2.add(menu.get(\"Chicken Rice\"), 1);
order2.add(menu.get(\"Mixed Rice\"), 1);
order2.add(menu.get(\"Toast Bread\"), 2);
System.out.println(\"Total for order 2: \" + order2.getTotal());
}
}
