March 31st - Lecture 21

 

Collected Lab 18 from those who finished it.  Others need to turn it in by noon tomorrow (Friday).

 

Distributed printouts of Hand.java and Driver.java from Lab17.

Went over Lab 17 in excrutiating detail

Established some design/coding guidelines in the process

 

 

 

Answered questions about programming assignment #4

 

Beatles.java (page 405 in our text)

·        We discussed how ArrayList was declared without specifying the type of item to be in the list.

·        We changed the second item to an int

·        The warning compile message was the same whether all of the elements inserted into the list were of type String or whether one of them was an int

·        We added a statement to check whether “Peter” was in the list before printing it in order to avoid an error

·        We modified Beatles.java and created Beatles2.java where we specified the type of item to be in the ArrayList.