From FANG
|
01 packagepackage is used to name the directory or folder a class is in scg.ch10;
02
03 importimport means to make the classes and/or packages available in this program fang2.core.Game;
04 importimport means to make the classes and/or packages available in this program fang2.sprites.OvalSprite;
05
06 publicpublic is used to indicate unrestricted access (any other class can have access) classclass is a group of fields and methods used for making objects ObstacleReader
07 extendsextends means to customize or extend the functionality of a class Game {open braces start code blocks and must be matched with a close brace
08 @Override
09 publicpublic is used to indicate unrestricted access (any other class can have access) voidvoid means the method does not return a value setup() {open braces start code blocks and must be matched with a close brace
10 OvalSprite a =this assignment operator makes the left side equal to the right side newnew is used to create objects by calling the constructor OvalSprite(0.25, 0.25);
11 a.setLocation(0.3, 0.4);
12 addSprite(a);
13
14 OvalSprite b =this assignment operator makes the left side equal to the right side newnew is used to create objects by calling the constructor OvalSprite(0.25, 0.25);
15 b.setLocation(0.7, 0.8);
16 addSprite(b);
17 }close braces end code blocks and must match an earlier open brace
18 }close braces end code blocks and must match an earlier open brace
19
20 //Uploaded on Mon Mar 29 21:39:38 EDT 2010
|
Download/View scg/ch10/ObstacleReader.java