public class Pizza { private String pizzaSize; // mandatory private int cheeseCount; // optional private int pepperoniCount; // optional private int hamCount; // optional public Pizza(String pizzaSize) { this(pizzaSize, 0, 0, 0); } public Pizza(String pizzaSize, int cheeseCount) { this(pizzaSize, cheeseCount, 0, 0); } public Pizza(String pizzaSize, int cheeseCount, int pepperoniCount) { this(pizzaSize, cheeseCount, pepperoniCount, 0); } public Pizza(String pizzaSize, int cheeseCount, int pepperoniCount, int hamCount) { this.pizzaSize = pizzaSize; this.cheeseCount = cheeseCount; this.pepperoniCount = pepperoniCount; this.hamCount = hamCount; } // getters }