Lecture Notes – February 8th, 2005

 

          Exam tomorrow night:  Wednesday, February 9th,  from 7:00pm to 9:00pm  in ISAT/CS 159

 

          We reviewed Lab 7 in great detail...   Here’s the expected output from your stubs    

Here is my javadocs for Length.java

 

 

          We briefly discussed the meaning of the work “token”. 

          Here is java code showing how to set a Scanner object to use a particular character as a delimiter of tokens.

          Note, that if the file is not found, the Scanner object will use the String in statement 35

 

          Here is some additional material on tokens from before Scanner was around

                   FacultyRecordTokenizer.java  

                   ExpressionTokenizer.java

cs.txt

 

         Here is an example showing the Exception that is raised if you try to read from a closed file. 

Note that for this code to run properly there has to be a file named input2.dat in the same directory as the class file. 

Note too that the file is being explicitly closed on line 24. 

 

Here is another example.  This one show what happens if you try to read from an empty file

 

Study the files from our text Slogan.java  and SloganCounter.java

 

Study Lab 5 program  Lab 5 Parts 1 and 2  KEY.htm

 

Be sure you understand the problems with your Lab 6 programs.Comments on Lab 6.doc

 

I’m not sure you ever got the link to the array program we played with in class TestArrays.java

 

See you tomorrow in lab  and at the exam.