(a) A link to a version of our completed CruiseControl program that you can execute from your browser. Execute this to become familiar with the simulation. Try different things --speeding up the clock by reducing the period, making the desired speed the same as the current speed, changing the road grade, and so forth.
NOTE. The screen that you see when you execute this program will look slightly different from the screen you get with your program. This program is a Java applet; your program is a Java application. On this screen, each of the little windows may have a message at the bottom, warning you that this applet may not be safe. Also, we have had to make up our own ``System output'' window, using a Frame with a TextArea, since one does not come automatically with an applet the way it does with an application.
(b) Eight files: SystemClock.java, SystemOutput.java, ClockedFrame.java, Accelerator.java, CurrentSpeed.java, DesiredSpeed.java, RoadGrade.java, CruiseControl.java.
Option 1: You should start a new CodeWarrior project using the CUCS Java stationery (not the CUCS Graphics stationery). Then, replace file CUCSApplication.java in that project by CruiseControl.java. Also, move copies of the other other files mentioned in (b) into this project folder and then add them to your project. Finally, change the preferences so that CodeWarrior knows that method main is in class CruiseControl instead of class Application. This is VERY important to do; otherwise the code will not run. The first day handout on CodeWarrior has instructions for how to do this.
Option 2: Alternatively, we will give the consultants in Carpenter two floppies -- one that contains the student version of the program (the whole project) for the Mac and another that contains the student version for the PC. You can then just copy the whole project onto your own floppy rather than downloading the files and setting up a project.
After following option 1 or option 2, you can compile and execute the program. It should run but it won't perform suitably until you fill in the missing sections in class CruiseControl.