Resource

Chapter 2: Dividing the Story (Methods)

Big Ideas: Methods for abstraction, Calling methods.
 

Things you will learn in this module:
  1. We use methods to break up a large amount of code into smaller, meaningful sections (note, this doesn't change the overall amount of code, it just changes how it is organized).
  2. If you want your methods to be executed when you hit play, you need to call the methods in the method world.my first method (that's the one we've been working in up to this point).
  3. The reason we used methods in this case was for the benefit of the human (aka you).  Breaking up programs is one way we use abstraction to manage complexity in computing.  Computers can do some very complex things.  Humans need to use abstraction to help them manage thinking about all the instructions they give the computer in their programs.
Vocabulary for this module:
 
Abstraction: The process of breaking up or separating complex things into smaller, more manageable pieces (e.g., breaking up a program into methods).
 
Call a Method: The place in a program where you tell the computer to go execute a method (and it jumps to where that method is defined and then comes back).
 
Execute/Hit Play: Tell the computer to execute instructions you have given it (for now, in world.my first method).
 
Method: A collection of instructions that naturally belong together to do some thing/task (e.g., Freak Out).
 
Method Definition: The place where you describe/put the instructions that should be executed when this method is called (in Alice, each method definition is in a different "tab" in the program area).
Up
33