CS670K Machine Problem 1 - Fall 1998

Due: Thursday, October 8

© Copyright University of New Haven 1998

Modify the the Bouncy Applet example so that it produces a new bouncing ball to its right at every bounce, like the bouncing balls below. Note that there is no limit to the number of balls created (although there is a limit to the number that can be displayed on the screen). Solutions with less flicker will be given more credit. (We will learn how to eliminate flicker later in the course.)

Hint: Recursively create instances of a bouncing ball class.

How to submit your solution

By the due date:
  1. Email to me at okrent@cs.newhaven.edu your modified BBouncy.java file.
  2. In your System2 pub sub-directory, store your compiled class files, and create an HTML file named BBouncy.html to display the applet. Here is a sample BBouncy.html file:
    <HTML><BODY>
    <H1>The BBouncy Applet</H1>
    <APPLET CODE="BBouncy.class" WIDTH=800 HEIGHT=200></APPLET>
    </BODY></HTML>
    

How to Create and Use your pub Sub-directory

To upload your files, you may use any file transfer program. If you are working on an MS-Windows PC, and need a file transfer program, click here to upload WS_FTP, a (freeware to students) self-expanding file transfer program. (This is not likely to work for AOL users... you'll have to come to an Echlin hall lab to upload.)

BE SURE TO UPLOAD YOUR .class FILES IN BINARY MODE, not Ascii!!

If your attempt to view your applet gets an Access Denied message, it may be because your pub sub-directory is not readable by all users. To correct this, login to System2 (e.g using telnet), and type the following command:

chmod a+rx pub pub/*

Home Page