8. Using methods to simplify programs
What you will learn
Methods are an essential part of program design. You can use methods to break a large solution into individual components and to create libraries of behaviors that your programs can use. The programs we’ve created to this point have worked with methods in the Snaps library (the
DisplayString method, for example) to interact with users. In this chapter, you will learn how to create and use methods of your own. You’ll find out how to give methods data to work on and how a program can receive results from a method’s work. Methods are a great way to make programs more concise and easier to ...