Write an application that draws a cube and make the program draw the cube 40 times in a circle . Use class GeneralPath and method draw of class Graphics2D.
You need to know techniques in chapter 1~ 10, 14, 15 23 ~ and 26. The main skills for this assignment are in Ch15. You can also use more advance skills to do this assignment.
This assignment comes with a CISP401V9A6.zip file. It includes two files (Cube.class and CubeJPanel.class.) Both of the.class files are executable files. You can place them in a sub folder (directory). Bring up a command prompt and go to the sub directory, type java Cube in the sub directory and hit Enter key. You should see the program run. If you put in proper information you should get to the result in the following pictures.
Please document the files properly and zip your Cube.java and CubeJPanel.java files into a proper named zip file for an assignment (refer to the assignment section of the class syllabus) and submit it to the A6 dropbox of the D2L Website.
Worth 150 points
AD6
Write a program that bounces a blue ball inside a JPanel. The ball should begin moving with a mousePressed event. When the ball hits the edge of the JPanel, it should bounce off the edge and continue in the opposite direction. The ball should be updated using a Runnable. The program should also provide user to add new ball with randomly choose color by clicking the mouse. It should allow adding a minimum of 20 balls. The created ball should be in different colors, moving to different directions and move with different speeds. The Frame should be 600X 600 and balls size is 20X20.
You need to know techniques in chapter 1~ 10, 14, 15 23 ~ and 26. The main skills for this assignment are in Ch26. You can also use more advance skills to do this assignment.
This assignment comes with a CISP401V9AD6.zip file. It includes five files (Ball.class, BallPane.class, BallPane$1.class, BouncingBall.class, and RepaintTimer.class) They are all executable files. You can place them in a sub folder (directory). Bring up a command prompt and go to the sub directory, type java BouncingBall in the sub directory and hit Enter key. You should see the program run. If you put in proper information you should get to the result in the following pictures.
Please document the files properly and zip your files (Ball.java, BallPane.java, BouncingBall.java, and RepaintTimer.java) into a proper named zip file for an advance assignment (refer to the assignment section of the class syllabus) and submit it to the A6 dropbox of the D2L Website.
Worth 180 points
Reviews
There are no reviews yet.