Interesting
A4 things
|
|||||||||||||
|
This page gives links to interesting procedures that were written for assignment A4. When you download one (or more), also download and use this version of Turtle.java and YourTurtle. The comment at the beginning of the class says how to run the interesting thing. We make no comments about the Java programming in these cases. Some, unfortunately, do not do a good job of specifying their interesting procedures. But the range of different interesting ideas is great! bda9-vsg3 Demo of the game Bricks --when a ball hits a brick, it disappears. You can say how many balls should be in play and how many hits it takes to erase a brick. Use: Ball.Bricks(2, 1, 5, 2); kgc7 You are an ant at CIT, a haven of bug killers and smiley ball throwers. You managed to scoot under a smiley ball to hide yourself from your enemies. However, one of them has found you: in fact, the GenInf employee makes a deal with you that if you can toss the ball into the garbage can, he will let you live (and have some sugar) .Use: b=new Ball(); b.ballGame(20, 95); ama64 A clock that works. Use: b= new Ball(); b.startClock(5, 30, 20); hk332 A bouncing ball that follows laws of simple projectile motion. Includes gravity and loss of kinetic energy when it hits the side. Use: b= new Ball(250, 250, 20); arm52 A night sky, with a shooting star. b= new Ball(); b.drawNight(1, 2, 1); khr5 Draw several flags, including the US flag. Use: b= new Ball(); b.flags(); mlp59 A nice picture. Use: b= new Ball(); b.Picture(); jk66 Show a spinning n-pointed star (where n is odd). Use: b= new Ball(); b.rotateStar(9, 80, 7); ddp24 A spiral with a ball descending into the middle of it. Use: b= new Ball(); b.spiralToInf(); djk48-mc434 8 balls bounce, one at a time, and end up lined up; then it repeats. Use: Ball.ballsLineUp(); jle38 A "boat" moves along the bottom of the screen and shoots the eight stars in the sky; when all the stars are gone, a spiral appears and then disappears in random places. Use: b= new Ball(); b.star(); hw97-gj24 The brick game, with a ball at a few bricks. Use: b= new Ball(30,55,20); b.pinBall(); ada26-en48 Display many shapes and colors using the spiral method, pausing at specific ones. p is the speed at which the pattern grows, or shrinks. If r= true, the pattern grows out, if r= false, the pattern shrinks. Use: d= new Ball(); d.crazyStuff(30, true); ays22-krb38 A spinning pulsar (a spiral "star", which spins and pulsates). Use: b= new Ball(); b.pulsar(10); phc8-rac82 Electrons around an atom (the ball), with movement. Use: b= new Ball(45, 47, 70); b.atomOrbitals(); qc32-snt5 Up to 4 balls in motion, which change direction when they collide. Use Ball.multimotion(4); rho2 A face, with the ability to have a moustache and a beard with colors of your choice. Use: import java.awt.*; b= new Ball(); b.drawFace(20, true, true, Color.blue, Color.gray, Color.red); rw93 A clown whose mouth and eyes depend on a parameter. Use: b= new Ball(); b.clown(50); zbh82 Create interesting, random pattern using n number of edges where n is an automatically picked random integer between 100 and 500. Use: Ball.fractal();
|
|||||||||||||