From ggc
|
01 packagepackage is used to name the directory or folder a class is in Tkirby;
02 importimport means to make the classes and/or packages available in this program arcade.*;
03 importimport means to make the classes and/or packages available in this program java.awt.geom.*;
04 importimport means to make the classes and/or packages available in this program fang.*;
05 importimport means to make the classes and/or packages available in this program wiki.Wiki;
06 /**
07 * This is a portfolio/arcade of all the
08 * programs I have written thisthis means the current object (the implicit parameter) semester.
09 * Revised: Travis Kirby
10 * @authorthis is the Javadoc tag for documenting who created the source code Jam Jenkins
11 */
12 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 TravisKirbyArcade extendsextends means to customize or extend the functionality of a class ArcadeGame
13 {open braces start code blocks and must be matched with a close brace
14 privateprivate is used to restrict access to the current class only Sound sound;
15
16 publicpublic is used to indicate unrestricted access (any other class can have access) TravisKirbyArcade()
17 {open braces start code blocks and must be matched with a close brace
18 setName("Travis Kirby's Arcade");
19 addArcadeLevel(newnew is used to create objects by calling the constructor Kirby.WackadotLevel());
20 addArcadeLevel(newnew is used to create objects by calling the constructor Kirby.LetsMakeADeal2Level());
21 addArcadeLevel(newnew is used to create objects by calling the constructor Kirby.TravValTrackerLevel());
22 addArcadeLevel(newnew is used to create objects by calling the constructor TravVal.BreakoutLevel());
23 sound=this assignment operator makes the left side equal to the right side newnew is used to create objects by calling the constructor Sound(Wiki.getMedia("Mario2.wav"));
24 persist(sound);
25 }close braces end code blocks and must match an earlier open brace
26
27 publicpublic is used to indicate unrestricted access (any other class can have access) voidvoid means the method does not return a value advanceFrame(doubledouble is the type for numbers that can contain decimal fractions timeElapsed)
28 {open braces start code blocks and must be matched with a close brace
29 Point2D.Double click=this assignment operator makes the left side equal to the right sidegetPlayer().getMouse().getClickLocation();
30 ifif executes the next statement only if the condition in parenthesis evaluates to true(click!=this is the not equals operator which evaluates to true if both sides are differentnullnull is the value used to refer to a non-existant object)
31 {open braces start code blocks and must be matched with a close brace
32 sound.play();
33 }close braces end code blocks and must match an earlier open brace
34 super.advanceFrame(timeElapsed);
35 }close braces end code blocks and must match an earlier open brace
36
37 }close braces end code blocks and must match an earlier open brace
|
Compiler Errors:
----------
1. ERROR in Kirby/WackadotLevel.java (at line 41)
dot=new ImageSprite(Wiki.getMedia("Donut"));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The constructor ImageSprite(URL) is undefined
----------
2. ERROR in Kirby/WackadotLevel.java (at line 46)
redDot=new ImageSprite(Wiki.getMedia("Donut.gif"));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The constructor ImageSprite(URL) is undefined
----------
17 problems (17 errors)
Download/View Tkirby/TravisKirbyArcade.java