This is the first time that you are developing an applet that will utilize packaged classes (For assignment #1, all classes and the applet were in the same directory and not packaged). It is critical to specify the codebase and code parameters in the applet tag of the html file correctly. It is also important that your .class files are all public. An applet that you have developed may run fine for you, but it is possible that no one, or most importantly, I can't run it. The CLASSPATH statement in your .cshrc file provides you access to your own files, even when you have forgotten to make them public. A more weird occurance is when one of your classmates runs your applet and it acts slightly differently, this one happens because when he/she is running your applet, Java is using one or more of his/her .class files. This is not unusual as you all have a Tank class and a displayableTank class that are used here and your directory structures are the same for this course.
In summary, an applet is not "working" unless I can run it. The following three things should be checked before submitting any applet:
Design the class changeableTank which is a subclass of class displayableTank. changeableTank.java and changeableTank.class need to be in your Tank directory. You should use the "original" tank class for this program, so copy your Tank.java file inot Tank.bak and recopy my version of the Tank class and compile it. changeableTank class must be packaged the same way as displayableTank. Make sure that all .class files are public. Here are the specs:
public changeableTank (int x, int y, boolean big) /* x,y -- where should the tank go big -- large or small */
public void switchSize()
public void changePosition(int x, int y) {
Build an applet that demonstrates that it works, have the applet work like my Changeable Tank Applet . Your applet should be placed in a new directory (Applets) off of your csc241 directory. Its package name should be csc241.Applets, once you compile it, make the .class file public.
Save the .html file for my version in your Applets directory also. The codebase and code parameters need to change. There should be no .cs in your codebase, and of course, the user name has be changed. There should be no .samples in your code parameter and the name of the .class file should be what you named your applet. Make the .html file public, and link to it from your csc241 page.
Mail me the appropriate files.
mail me the .java file and keep a link to the html file for this applet in your csc241 page.