From ggc
|
01 packagepackage is used to name the directory or folder a class is in jam;
02
03 importimport means to make the classes and/or packages available in this program fang.*;
04 importimport means to make the classes and/or packages available in this program java.awt.geom.*;
05 importimport means to make the classes and/or packages available in this program wiki.Wiki;
06 /**
07 * All about my classclass is a group of fields and methods used for making objects here.
08 * @authornull Jam Jenkins
09 */
10 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 GravityTracker extendsextends means to customize or extend the functionality of a class ProjectileTracker
11 {open braces start code blocks and must be matched with a close brace
12 privateprivate is used to restrict access to the current class only doubledouble is the type for numbers that can contain decimal fractions gravityAmount;
13
14 publicpublic is used to indicate unrestricted access (any other class can have access) GravityTracker(doubledouble is the type for numbers that can contain decimal fractions x, doubledouble is the type for numbers that can contain decimal fractions y)
15 {open braces start code blocks and must be matched with a close brace
16 super(x, y);
17 gravityAmount=this assignment operator makes the left side equal to the right side0.1;
18 }close braces end code blocks and must match an earlier open brace
19
20 publicpublic is used to indicate unrestricted access (any other class can have access) voidvoid means the method does not return a value setGravityAmount(doubledouble is the type for numbers that can contain decimal fractions amount)
21 {open braces start code blocks and must be matched with a close brace
22 gravityAmount=this assignment operator makes the left side equal to the right sideamount;
23 }close braces end code blocks and must match an earlier open brace
24
25 publicpublic is used to indicate unrestricted access (any other class can have access) voidvoid means the method does not return a value advanceTime(doubledouble is the type for numbers that can contain decimal fractions timePassed)
26 {open braces start code blocks and must be matched with a close brace
27 super.advanceTime(timePassed);
28 Point2D.Double original=this assignment operator makes the left side equal to the right sidegetVelocity();
29 original.y+=this increases the variable on the left by the value on the righttimePassed*gravityAmount;
30 setVelocity(original);
31 }close braces end code blocks and must match an earlier open brace
32 }close braces end code blocks and must match an earlier open brace
|
Compiler Errors:
----------
1. ERROR in jam/GravityTracker.java (at line 25)
public void advanceTime(double timePassed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Cannot override the final method from Transformer
----------
1 problem (1 error)
Download/View jam/GravityTracker.java