Introduction to Programming with Greenfoot: Object-Oriented Programming in Java with games and Simulations is ideal for introductory courses in Java Programming or Introduction to Computer Science. The only textbook to teach Java programming using Greenfoot—this is “Serious Fun.” Programmin
Introduction to programming with Greenfoot: object-oriented programming in Java with games and simulations
✍ Scribed by Kölling, Michael
- Publisher
- Pearson; Prentice Hall
- Year
- 2009;2010
- Tongue
- English
- Leaves
- 207
- Category
- Library
No coin nor oath required. For personal study only.
✦ Synopsis
Introduction to Programming with Greenfoot: Object-Oriented Programming in Java with games and Simulations" is ideal for introductory courses in Java Programming or Introduction to Computer Science. "The only textbook to teach Java programming using Greenfoot this is Serious Fun. " Programming doesn t have to be dry and boring. This book teaches Java programming in an interactive and engaging way that is technically relevant, pedagogically sound, and highly motivational for students. Using the Greenfoot environment, and an extensive collection of compelling example projects, students are given a unique, graphical framework in which to learn programming.
✦ Table of Contents
Cover......Page 1
Contents......Page 8
List of scenarios discussed in this book......Page 12
Acknowledgments......Page 16
Introduction......Page 18
1.1 Getting started......Page 20
1.2 Objects and classes......Page 21
1.3 Interacting with objects......Page 23
1.4 Return types......Page 24
1.5 Parameters......Page 25
1.6 Greenfoot execution......Page 26
1.8 Understanding the class diagram......Page 27
1.9 Playing with Asteroids......Page 29
1.10 Source code......Page 30
1.11 Summary......Page 32
2.1 The Little Crab scenario......Page 33
2.2 Making the crab move......Page 35
2.3 Turning......Page 36
2.4 Dealing with screen edges......Page 38
2.5 Summary of programming techniques......Page 42
3.1 Adding random behavior......Page 44
3.2 Adding worms......Page 47
3.3 Eating worms......Page 49
3.4 Creating new methods......Page 50
3.6 Keyboard control......Page 53
3.7 Ending the game......Page 55
3.8 Adding sound......Page 57
3.9 Summary of programming techniques......Page 59
4.1 Adding objects automatically......Page 60
4.2 Creating new objects......Page 62
4.3 Animating images......Page 63
4.4 Greenfoot images......Page 64
4.5 Instance variables (fields)......Page 65
4.6 Assignment......Page 66
4.7 Using actor constructors......Page 67
4.8 Alternating the images......Page 69
4.10 Counting worms......Page 70
4.11 More ideas......Page 72
4.12 Summary of programming techniques......Page 73
I1.2 Export to application......Page 74
I1.3 Export to a web page......Page 75
I1.4 Publishing on the Greenfoot Gallery......Page 76
Chapter 5 Making music: An on-screen piano......Page 78
5.1 Animating the key......Page 79
5.2 Producing the sound......Page 82
5.3 Abstraction: Creating multiple keys......Page 83
5.4 Building the piano......Page 85
5.5 Using loops: The while loop......Page 86
5.6 Using arrays......Page 89
5.7 Summary of programming techniques......Page 93
Chapter 6 Interacting objects: Newton’s Lab......Page 95
6.1 The starting point: Newton’s Lab......Page 96
6.2 Helper classes: SmoothMover and Vector......Page 97
6.3 The existing Body class......Page 100
6.4 First extension: Creating movement......Page 102
6.5 Using Java library classes......Page 103
6.6 Adding gravitational force......Page 104
6.7 The List type......Page 107
6.8 The for-each loop......Page 108
6.9 Applying gravity......Page 110
6.10 Trying it out......Page 112
6.11 Gravity and music......Page 114
6.12 Summary of programming techniques......Page 116
Chapter 7 Collision detection: Asteroids......Page 118
7.1 Investigation: What is there?......Page 119
7.2 Painting stars......Page 120
7.3 Turning......Page 123
7.4 Flying forward......Page 124
7.5 Colliding with asteroids......Page 126
7.6 Casting......Page 129
7.8 Growing the wave......Page 132
7.9 Interacting with objects in range......Page 136
7.10 Further development......Page 138
7.11 Summary of programming techniques......Page 139
Interlude 2 The Greeps competition......Page 140
I2.1 How to get started......Page 141
I2.2 Programming your Greeps......Page 142
I2.4 Technicalities......Page 143
8.1 Preparation......Page 144
8.2 Working with sound......Page 146
8.3 Sound recording and editing......Page 147
8.4 Sound file formats and file sizes......Page 148
8.6 Image files and file formats......Page 150
8.7 Drawing images......Page 152
8.8 Combining images files and dynamic drawing......Page 154
8.9 Summary......Page 156
Chapter 9 Simulations......Page 158
9.1 Foxes and rabbits......Page 159
9.2 Ants......Page 162
9.3 Collecting food......Page 163
9.5 Adding pheromones......Page 166
9.7 Summary......Page 169
10.1 Marbles......Page 171
10.2 Lifts......Page 172
10.3 Boids......Page 173
10.4 Circles......Page 174
10.5 Explosion......Page 175
10.6 Breakout......Page 176
10.7 Platform jumper......Page 177
10.8 Wave......Page 178
10.9 Summary......Page 179
A: Installing Greenfoot......Page 180
B: Greenfoot API......Page 182
C: Collision detection......Page 186
D: Some Java details......Page 192
B......Page 202
G......Page 203
M......Page 204
R......Page 205
V......Page 206
W......Page 207
📜 SIMILAR VOLUMES
Ecrit par le créateur de Greenfoot, Michael Kölling, ce livre utilise Greenfoot pour expliquer la programmation avec Java. Au travers de simulations et de jeux, il enseigne les concepts de la programmation de manière facile et accessible pour tous.
xiii, 190 p. : 24 cm
An Introduction to Object-Oriented Programming with Java takes a full-immersion approach to object-oriented programming. Proper object-oriented design practices are emphasized throughout the book. Students learn how to use the standard classes first, then learn to design their own classes. Wu
"An Introduction to Object-Oriented Programming with Java" takes a full-immersion approach to object-oriented programming. Proper object-oriented design practices are emphasized throughout the book. Students learn how to use the standard classes first, then learn to design their own classes. Wu uses