Tuesday, November 26th

 

Download and open the following file: hedgehogs.zip - remember you will need to unzip it first.

The Joy of Coding - Classes and Objects
The Dodge version of this video:
Open Hedgehogs file
Creating an instance of an object
Seeing the properties of an object
Object methods
Running a method
Creating multiple objects (shift key)
Act vs Run
Method return types

Lesson 2 Due Today!

Section 3: Lesson 2 - Methods, Variables and Parameters - Vocabulary - you should already know several of these terms.
- The memory that the instance of the class has. That memory can be saved and accessed later as long as the instance exists.
- A field used to store information about the class to use immediately or later.
- Used to pass values to methods to specify how objects are to move, or to tell objects what type of response we expect when we ask objects a question.
- Each subclass can use (inherits) the methods from its superclass.
- Word at the beginning of the method that tells us what type of information a method call will return.
- Set of operations or tasks that instances of a class can perform. When a method is invoked, it will perform the operation or task specified in the source code.
- A method call instructs the instance to perform an operation or task. You can read the method to understand what operation or task is to be performed.
- Access, return type, name, and parameters for a method.
- Process of finding and removing bugs—or errors—in a computer program.

Complete Section 3: Lesson 2 - Methods, Variables and Parameters slides.
Complete Section 3: Lesson 2- Methods, Variables and Parameters practice.
Show these to your instructor for teacher check.

Section 3: Lesson 3 - Source Code and Documentation vocabulary:
- Multiple methods executed by Greenfoot in the order in which they are written in the program.
- Tells the object which methods to perform, and in what order.
- Describe what the code does to other humans. Greenfoot does not read it, nor does it impact the functionality of the program.
- The analysis process where Java technology programmers analyze a problem and then create objects to build a system, or more specifically, to solve the problem.
- Statement written to tell your program to execute a set of instructions only if/when a certain condition is true.
- A set of comments that the programmer can modify to let others who view the source code know what the class is, what it does, the author of the code, and the date it was last modified.

Complete Section 3: Lesson 3 - Source Code and Documentation slides.
Complete Section 3: Lesson 3- Source Code and Documentation practice and project.
Show these to your instructor for teacher check.

Continue working on your Alice game.

 

Homework

Have a great Thanksgiving!

 

What

In this lesson, you will learn how to:
• Use the IF control statement to effect execution of instructions
• Use the WHILE control statement to create a conditional loop for repetitive behavior

 

Why

When you create an animation or a game you may want an object to execute an action based upon a decision. You can use the IF control structure to help an object make a decision. “If you encounter a rock turn left, otherwise continue going forward”. You may also want objects in your animation to execute an action while
some condition is true. “While the boat moves left wave the person’s hand”. You can use the WHILE control structure to continuously loop an action while a condition is true.

 

How

By completing the slides, quiz and practice exercises.