/** * Demonstrates declaring and calling methods to print * instructions for making dinner * @author Pete Nordquist * @version 100120 */ public class W04N01 { public static void main(String[] args) { // Announce the intention System.out.println("Here are the steps for cooking dinner."); // prepare printPrepareInstructions(); // cook printCookingInstructions(); // cleanup printCleanupInstructions(); System.out.println("That's it."); } // signature for printPrepareInstuctions method public static void printPrepareInstructions() { // body of printPrepareInstuctions method System.out.println("Prepare: "); System.out.println("1. Find spices"); System.out.println("2. Get out necessary pots and pans."); System.out.println(); } // signature for printCookingInstructions method public static void printCookingInstructions() { // body of printCookingInstructions method System.out.println("Do the work: "); System.out.println("1. Chop veggies"); System.out.println("2. Make sauce."); System.out.println("3. Start entree cooking"); System.out.println("4. Make salad"); System.out.println("5. Set table"); System.out.println("6. Finish entre"); System.out.println("7. Serve"); System.out.println(); } // signature for printCleanupInstructions method public static void printCleanupInstructions() { // body of printCleanupInstructions method System.out.println("1. Find someone else to do it"); System.out.println(); } }