// Allison Obourn, CSE 142 // Prints a recipe for making sugar cookies. // goal: demonstrate procedural decomposition // static methods capture structure and reduce redundanc public class BakeCookies { public static void main(String[] args) { mixBatter(); bakeCookies(); bakeCookies(); bakeCookies(); bakeCookies(); bakeCookies(); makeFrosting(); } // make frosting public static void makeFrosting() { System.out.println("Mix ingredients for frosting."); System.out.println("Spread frosting and sprinkles."); } // bake Cookies public static void bakeCookies() { System.out.println("Set the oven temperaturev to 350."); System.out.println("Set the timer."); System.out.println("Place a batch of cookies into the oven."); System.out.println("Allow the cookies to bake."); } // mix batter public static void mixBatter() { System.out.println("Mix the dry ingredients."); System.out.println("Cream the butter and sugar."); System.out.println("Beat in the eggs."); System.out.println("Stir in the dry ingredients."); } }