Home‎ > ‎ICT Programming‎ > ‎Greenfoot‎ > ‎

Greenfoot Textbook



Introduction to Programming with Greenfoot - Introduction




Chapter 1 Getting to know Greenfoot 3

Activity: Chapter 1 Warmup Questions
1.1 Getting started 3
1.2 Objects and classes 4
1.3 Interacting with objects 6
1.4 Return types 7
1.5 Parameters 8
1.6 Greenfoot execution 9
1.7 A second example 10
1.8 Understanding the class diagram 10
1.9 Playing with Asteroids 12
1.10 Source code 13
1.11 Summary 15

Activity: Chapter 1 Review Questions (you will need the Wombats scenario for this which is available through the                                                                   Teacher handout folder or through this link)    


Marking: Mark your Chapter 1 Review Questions with this copy


Source Code: Wombats 

Source Code: Asteroids

Optional Review: Chapter 1 Flashcards

Chapter 2 The first program: Little Crab 16


2.1 The Little Crab scenario 16
2.2 Making the crab move 18
2.3 Turning 19
2.4 Dealing with screen edges 21
2.5 Summary of programming techniques 25



Source Code: Little Crab

                
Optional Review: Chapter 2 Flashcards

Self-Quiz: Chapters 1 & 2 (input mark)


Chapter 3 Improving the Crab—more sophisticated programming 27



3.1 Adding random behavior 27
3.2 Adding worms 30
3.3 Eating worms 32
3.4 Creating new methods 33
3.5 Adding a Lobster 36
3.6 Keyboard control 36
3.7 Ending the game 38
3.8 Adding sound 40
3.9 Summary of programming techniques 42



Review Quiz: Chapter 1-3


Chapter 4 Finishing the crab game 43


4.1 Adding objects automatically 43
4.2 Creating new objects 45
4.3 Animating images 46
4.4 Greenfoot images 47
4.5 Instance variables (fields) 48
4.6 Assignment 49
4.7 Using actor constructors 50
4.8 Alternating the images 52
4.9 The if/else statement 53
4.10 Counting worms 53
4.11 More ideas 55
4.12 Summary of programming techniques 56



Review: Jeopardy - Chapters 1-4



Appendix B - Greenfoot API

Appendix C - Collision Detection

Appendix D - Some Java Details


Unit Test - Chapters 1-4

Use the Answer Key to mark the first half of the quiz. I will mark your code section myself.

Give yourself a score /50 and enter it into the form below

Enter Your Score Here


Confused?

Java Tutorials may help you with some of the worksheet questions.


Don't stress out if you don't get it right away. Trust me, you will.

BEING CONFUSED IS OK!!

Being confused is when your mind is in a state of imbalance and things are not connecting. By just patiently staying in that state, not getting worried, and talking to as many people as you can, you will figure things out. You need to become like a treasure hunter in search of answers. Use the internet, use your classmates, use everybody around you. The struggle to discover is the best way to learn. I guarantee it!




Comments