Tips for Assignment 8


There are five files you need to download for assignment 8:  Bank.java, ManyBanks.java, AcctEntry.java, warner.dat, and disney.dat. Files AcctEntry.java, Banks.java, and ManyBanks.java should be added to your project. Note that the file AcctEntry was not mentioned in the handout, but it contains the class AcctEntry, so you must add this one to your project too. The other two files are datafiles and must be put in the same folder as your project. Do not add the data files to the project itself. Just put them in the same folder.

Notes for PC users.  If you are working on a PC using Code Warrior you may find that your output window is not staying open. There are two easy ways to fix it.

  1. Add to the top of your main method the code we have used to open an input window. This of course only works if you are using the CUCS Java Application stationery. The code is:
    // create System.in window and initialize Text object in to read from it.
    SystemInput sysIn = new SystemInput();
    TokenReader in = new TokenReader(System.in);
    This will tie up resources so that the output window remains open. You will never use the input window.
    OR
  2. Right after the code you added to the main method, put in an infinite loop:
    while (true) ;

Assignment 8 produces a lot of output. Since the output window for the PC does not scroll we suggest you do the following in order to print it. Put comment notation (/* */) around some of the output statements when you are ready to print. Print out the output produced. Now take off those comment markers and comment out a different set of print statements, etc. This way you will have to run the program a few times, each time getting part of the output. But it works. (An easier way of course may be to run it on a Mac in a lab when ready to print the output.)


Last update:  06/08/00 11:55