Lecture 10 - February 8, 2007

 

Here is a great URL for enumerated types which shows where the  .values( ) method used in Deitel example comes from   http://java.sun.com/docs/books/tutorial/java/javaOO/enum.html

 

Went over these examples in lab today:  February 21 :

 

public enum Sessions
{
  SPRING, SUMMER, FALL
}

 

 

public class TestForEach
{
  
public static void main (String [] args)
   {
    Sessions mySession;
 
     mySession = Sessions.SPRING;
 
    
for (Sessions s:  Sessions.values() )
      System.out.println (s);
   }
}

 

 

 

Programs due by midnight tonight using submit -

directions provided with programming assignment and descriptions.

 

Programs must be in folders with specified covers to be graded

 

No class on Tuesday, February 13th  because it’s assessment day

 

If you were notified that you need to participate in assessment day for computer science, come to this room (ISAT/CS 236)  at 10:00am

 

Make sure you add yourself to the CS list -

Go to www.cs.jmu.edu

Follow the link under departmental mailing lists:  http://listserv.jmu.edu/archives/jmucs-l.html

Click on http://listserv.jmu.edu/archives/jmucs-l.html

           

Yesterday’s lab, LAB 9 - Enumerated Types Pt. 2,  is to be completed before 1:15pm  on Monday  (i.e. submitted before first lab section begins).

 

Helpful references:    

Big Java  by Cay Hosrtmann  (current edition is 2nd, new one on way)

            Java - How to Program by Deitel and Deitel, 7th edition (uses Java 6.0)

 

Link to slides shown in class today. 

 

Here are the files we looked at in class.  Rename them as *.java if you want to compile and run them.