
// Lecture Example of JavaDUCK input
// Dan Grossman
// 9 April 1998
// This file is JavaDUCK compatible.  Not all Java files are!

/* Notice how we can have comments even thought the grammar
 * doesn't have them -- the lexer eats the comments for us! */
 
import java.io;
import java.util;

package goodThingsComeInSmallOnes;

public final class Pizza extends JunkFood 
	implements Sliceable, Eatable {
	// I'm purposely putting things in a dumb order.  The Duck will organize it better!	

	//Variables
	private Vector toppings, cheeses;
	static final int numSlicesDefault; // Quack, quack!
	private int slicesRemaining;
	
	//Methods
	public Pizza () {
		super();
		slicesRemaining = numSlicesDefault;
		toppings = new Vector();
	}
	public void addTopping (Topping topping) {
		if (Topping.name.equals("Duck")) {
			System.err.println("Don't eat ducks. Use them to document");
			return;
		}
		toppings.addElement(topping)
	}
	public void addCheese (Cheese c) {
		cheeses.addElement(c);
	}
	public Pizza(int numSlices) {
		super();
		slicesRemaining = numSlices;
	}
	public void eatSlice() {
		slicesRemaining--;
	}
	public static void sayHi (int a, int b) {
		System.out.println("Hi Mom!");
	}
}
