import java.util.Vector;
import java.io.*;

class Order {
	
	private Vector foodItems = new Vector(0);	

	/* Constructor: Takes the input stream as an argument
	 *              so that the Order can read in the items 
	 */	
	public Order(BufferedReader in) throws IOException {

		String next = in.readLine();

		while (next != null && !next.equals("")) {
			// NOTE: This loop needs to be fixed to handle other
			// types of FoodItems.
			foodItems.add(new Hamburger(in));
			next = in.readLine();
		}	
	}
	
	/* price:   Returns the price of the order in dollars
	 *          (rounded to the nearest 0.01).
	 */
	 
	public double price() {
		double orderPrice=0.0;
		
		for(int i = 0; i < foodItems.size(); i++) {				
			orderPrice += ((FoodItem)foodItems.get(i)).price();
		}	
		return orderPrice ;
	}
	
	/* toString: Returns a string representation of the order
	 */
	public String toString() {

		String toReturn = "Order: \n";
		for(int i = 0; i < foodItems.size(); i++) {
			toReturn += foodItems.get(i).toString();
		}	
		return toReturn;
	}
}
