// Tyler Rigsby, CSE 142 // This program prints instructions for baking cookies public class BakeCookies { public static void main(String[] args) { makeBatter(); bakeCookies(); bakeCookies(); bakeCookies(); makeFrosting(); } public static void makeBatter() { 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."); System.out.println(); } public static void bakeCookies() { System.out.println("Set the oven temperature."); System.out.println("Set the timer for 10 minutes."); System.out.println("Place the cookies into the oven."); System.out.println("Allow the cookies to bake."); System.out.println(); } public static void makeFrosting() { System.out.println("Mix the ingredients for the frosting."); System.out.println("Spread frosting and sprinkles onto the cookies."); System.out.println(); } } // structure // -- main is a concise summary // -- each method does its own task // redundancy // -- no consecutive lines of code repeated // static methods