Com S 100J Introduction to Computer Programming Grade: letter or S/U Spring 2005
655-085 TR 09:05 Kimball B11 Instructor: David Gries 4 credits
655-276 TR 11:15 Olin 255 Newsgroup: cornell.class.cs100j

Interesting A4 things
Home
About email
Academic Excellence Workshop
Academic integrity
Announcements
DrJava
Exams & grades
FAQs
Handouts, general
    Assignments
    Labs
    Quizzes
Links
Staff info
Syllabus
Texts
Times & places
 
Email Gries

 

This page gives links to interesting procedures that were written for assignment A4. Each one is either in class Ball or in class MyTurtle. When you download one (or more), also download and use this version of Turtle.java. Below, the names of the classes have been extended with the Cornell netid(s) of the student(s) submitting the assignment. 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.

The first 8 or so are the most interesting.

MyTurtlemk374saj29.java. Watch yourself go through a tunnel, with the hole at the end getting bigger and bigger as you draw nearer to it. Also, watch the program draw ALL spirals --it is fascinating.

Ballaew42mhs38.java. See a model of the Bohr atom, with electrons orbiting around the nucleus!

MyTurtleobn3.java. Watch the image of Fighter from Final Fantasy walking across the screen.

Ballsps27.java. Watch two balls bounce in a cube!

Ballffc3.java. Watch a simulation of gravity when a ball bounces.

Ballpjo8.java. The beginnings of the breakout game --rectangles disappear when the ball hits them, and there is a bar going back and forth that sends the ball away from the rectangles (and changes the ball's color) when the ball hits it.

Ballnas28.java. When two balls collide, one of them splits into two balls (of a different color). Pretty soon, there are lots of balls.

Balljes239.java. Give it any number of balls in an array and they all bounce around.

Ballml363. Create 4 rectangles at the top and one ball. The ball bounces around. When it hits a rectangle, the rectangle disappears.

Ballamh82.java. Create a bunch of rectangles at the top and one ball. The ball bounces around. When it hits a rectangle, the rectangle becomes black.

Balldah64.java. Watch a hockey "ball" bounce around. When it hits the net, a red light blinks.

Ballayl27rw98.java. Two balls are created and started bouncing around. When one hits the boundary or the other ball, it changes color. The balls are not erased, so you see their paths.

Balldac69.java. Two balls start bouncing around. When they collide, they split into smaller balls.

Balljdr59jpv23.java. As the ball bounces around, flames trail behind it.

Ballnbc5saf37. n balls (second argument are moved at random speed between s/2 and -2/3 (s is first argument). They change color randomly at each step.