Placeholder

COMP 274 Week 7 Lab Java Doc

$7.00

Description

Documentation
The objective of this part of the lab is to create documentation using Javadoc for the Paddle Ball Game project from week 5. The following documentation requirements must be met:
All commentary must use standard JavaDoc comments and tags.
For every class add a class level comment including the author and the purpose of the class.
Where one class heavily depends on the use of an object from another class, provide a link to the other class using the @see tag.
For every method, add a method level comment which includes information on the purpose of the method, the method parameters, and the result returned by the method.
Use the javadoc command to generate HTML files for your project.
Use the browser to view your generated documentation to verify that all the required information for all the classes is included.
Consult the document provided describing how to export JavaDoc comments from Eclipse.
When your documentation is complete, turn in one of the following depending on what your instructor requires:
Print outs of all the documentation pages from the browser.
A Zip file containing all the documentation pages.
Deployment
Create a JAR file for the Paddle Ball Game project from week 5. The JAR file must contain all the class files needed to make the Paddle Ball Game work. Consult the document provided describing how to export a JAR file from Eclipse. To test if you have made your JAR file correctly, double click on your JAR file using Windows Explorer. The Paddle Ball Game should start running. If you are on Citrix, you will need to copy your game to a local computer before you can successfully execute it.
When you have successfully executed your JAR file, turn in a copy of your JAR file to your instructor.
SCREENSHOTS
SOLUTION
PAYMENT
ENTIRE COURSE
The solution includes a zip file.
Attachments [Move over files to preview content of those files]
COMP274_Lab_7.zip (376.07 KB)
COMP274Lab7.jar
COMP274_LAB7_Doc_Screenshot.png
COMP274_LAB7_Screenshot.png
Eclipse project
COMP274Lab7
.classpath
.project
.settings
org.eclipse.jdt.core.prefs
bin
Ball.class
Controller.class
Display.class
Paddle.class
PlayTest.class
src
Ball.java
Controller.java
Display.java
Paddle.java
PlayTest.java
java source code
Ball.java
Controller.java
Display.java
Paddle.java
PlayTest.java
javaDoc
allclasses-frame.html
allclasses-noframe.html
Ball.html
class-use
Ball.html
Controller.html
Display.html
Paddle.html
StartGame.html
constant-values.html
Controller.html
deprecated-list.html
Display.html
help-doc.html
index-files
index-1.html
index-10.html
index-2.html
index-3.html
index-4.html
index-5.html
index-6.html
index-7.html
index-8.html
index-9.html
index.html
overview-tree.html
package-frame.html
package-list
package-summary.html
package-tree.html
package-use.html
Paddle.html
resources
background.gif
tab.gif
titlebar.gif
titlebar_end.gif
serialized-form.html
StartGame.html
stylesheet.css
COMP274_LAB7_Document.docx
Preview Ball.java
xxxxxxx xxx xxxxxxx = 1;
xxxxxxx xxx xxxxxx, xxxxx;
public Ball(int frameWidth, int frameHeight) { width = frameWidth; height = frameHeight; pos = new Point(); pos.x = (int) (Math.random() * (width – RADIUS)) + RADIUS; pos.y = (int) (Math.random() * (height / 2 – RADIUS)) + RADIUS; }
public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setColor(ballColour);
x2x.xxxxxxxx(xxx.x – xxxxxx, xxx.x – xxxxxx, 2 * xxxxxx, 2 * xxxxxx);
}
xxxxxx xxxx xxxx() {
xx (xxx.x < xxxxxx) { xxxxxxx = -xxxxxxx; Preview Controller.java xxxxxxxxxxxxxx(xxx xxxxxxx()); } xxxxxx xxxx xxxxx(xxxxxxxx x) { xxxxx.xxxxx(x); if (isContact()) { myBall.bounce(); } else { myPaddle.paint(g); } } public boolean isContact() { if (myPaddle.area().contains(myBall.getPosition())) { return true; } else { return false; } } // xxxxx xxxxx xxx xxx xxxxxxxx xxxxxxx xxxxx xxxxxxx xxxxxxx xxxxxxxxxx { Preview Display.java xxxxxx xxxx.xxx.*; xxxxxx xxxxx.xxxxx.*; xxxxxx xxxxx xxxxxxx xxxxxxx xxxxxx { protected static final int FRAME_WIDTH = 320; protected static final int FRAME_HEIGHT = 480; protected Ball myBall = new Ball(FRAME_WIDTH, FRAME_HEIGHT); public Display(String title) { xxxxx(xxxxx); xxxxxxx(xxxxx_xxxxx, xxxxx_xxxxxx); xxxxxxxxxxxxxxxxxxxxxxxx(xxxxxx.xxxx_xx_xxxxx); } xxxxxx xxxx xxxxx(xxxxxxxx x) { Preview Paddle.java xxxxxx xxxx.xxx.*; xxxxxx xxxxx xxxxxx { private int x, y; private int paddleWidth = 90; private int paddleHeight = 10; private int move = 5; private Color paddleColour = Color.blue; public Paddle(int frameWidth, int frameHeight) { x = (xxx) (xxxx.xxxxxx() * (xxxxxxxxxx - xxxxxxxxxxx)); x = xxxxxxxxxxx - xxxxxxxxxxxx - 20; } xxxxxx xxxx xxxxxxxxx() { x = x + xxxx; Preview PlayTest.java public class PlayTest { public static void main(String[] args) { Controller controller = new Controller("Paddle Ball Game"); controller.play(); xxxxxxxxxx.xxxx(); } } Preview Ball.java xxxxxxx xxx xxxxxxx = 1; xxxxxxx xxx xxxxxx, xxxxx; public Ball(int frameWidth, int frameHeight) { width = frameWidth; height = frameHeight; pos = new Point(); pos.x = (int) (Math.random() * (width - RADIUS)) + RADIUS; pos.y = (int) (Math.random() * (height / 2 - RADIUS)) + RADIUS; } public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setColor(ballColour); x2x.xxxxxxxx(xxx.x - xxxxxx, xxx.x - xxxxxx, 2 * xxxxxx, 2 * xxxxxx); } xxxxxx xxxx xxxx() { xx (xxx.x < xxxxxx) { xxxxxxx = -xxxxxxx; Preview Controller.java xxxxxxxxxxxxxx(xxx xxxxxxx()); } xxxxxx xxxx xxxxx(xxxxxxxx x) { xxxxx.xxxxx(x); if (isContact()) { myBall.bounce(); } else { myPaddle.paint(g); } } public boolean isContact() { if (myPaddle.area().contains(myBall.getPosition())) { return true; } else { return false; } } // xxxxx xxxxx xxx xxx xxxxxxxx xxxxxxx xxxxx xxxxxxx xxxxxxx xxxxxxxxxx { Preview Display.java xxxxxx xxxx.xxx.*; xxxxxx xxxxx.xxxxx.*; xxxxxx xxxxx xxxxxxx xxxxxxx xxxxxx { protected static final int FRAME_WIDTH = 320; protected static final int FRAME_HEIGHT = 480; protected Ball myBall = new Ball(FRAME_WIDTH, FRAME_HEIGHT); public Display(String title) { xxxxx(xxxxx); xxxxxxx(xxxxx_xxxxx, xxxxx_xxxxxx); xxxxxxxxxxxxxxxxxxxxxxxx(xxxxxx.xxxx_xx_xxxxx); } xxxxxx xxxx xxxxx(xxxxxxxx x) { Preview Paddle.java xxxxxx xxxx.xxx.*; xxxxxx xxxxx xxxxxx { private int x, y; private int paddleWidth = 90; private int paddleHeight = 10; private int move = 5; private Color paddleColour = Color.blue; public Paddle(int frameWidth, int frameHeight) { x = (xxx) (xxxx.xxxxxx() * (xxxxxxxxxx - xxxxxxxxxxx)); x = xxxxxxxxxxx - xxxxxxxxxxxx - 20; } xxxxxx xxxx xxxxxxxxx() { x = x + xxxx; Preview PlayTest.java public class PlayTest { public static void main(String[] args) { Controller controller = new Controller("Paddle Ball Game"); controller.play(); xxxxxxxxxx.xxxx(); } } Preview allclasses-frame.html &xx;!xxxxxxx xxxx xxxxxx &xxxx;-//x3x//xxx xxxx 4.01 xxxxxxxxxxxx//xx&xxxx; &xxxx;xxxx://xxx.x3.xxx/xx/xxxx4/xxxxx.xxx&xxxx;&xx; &xx;!-- xxxxxxx --&xx; &xx;xxxx xxxx=&xxxx;xx&xxxx;&xx; &xx;xxxx&xx; &xx;!-- xxxxxxxxx xx xxxxxxx (xxxxxxx 1.7.0_09) xx xxx xxx 07 22:21:31 xxx 2014 --&xx;All Classes

All Classes

&xx;xx&xx;
&xx;xx&xx;&xx;x xxxx=&xxxx;xxxx.xxxx&xxxx; xxxxx=&xxxx;xxxxx xx &xxx;xx;xxxxxxx&xxx;xx;&xxxx; xxxxxx=&xxxx;xxxxxxxxxx&xxxx;&xx;xxxx&xx;/x&xx;&xx;/xx&xx;
&xx;xx&xx;&xx;x xxxx=&xxxx;xxxxxxxxxx.xxxx&xxxx; xxxxx=&xxxx;xxxxx xx &xxx;xx;xxxxxxx&xxx;xx;&xxxx; xxxxxx=&xxxx;xxxxxxxxxx&xxxx;&xx;xxxxxxxxxx&xx;/x&xx;&xx;/xx&xx;
&xx;xx&xx;&xx;x xxxx=&xxxx;xxxxxxx.x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