Week 3

 

Quiz

 

Hand back HW1

·        comment on:

·        putting comments at the end of long loops

·        don’t put too many comments and lines in

·        indent consistently

·        put declarations at the top (except dynamic arrays and loop counters)

 

Review HW2 problem

 

Review FSMs

·        do example of simple telephone

 

Chapter 3

·        notice that arrays are reference variables

·        implications for assignment, parameters

·        <array>.length

·        <array1> = array2>; - this just copies the reference to the array object!

·        ( int[] ) <array>.clone()  - use this to make a complete copy

 

·        Book page 102

·        Discuss what a bag or collection is

·        Discuss implementation using an array

·        Size

·        Adding items

·        Increasing size

·        Ask them how to implement removing an item

 

In class, work on HW2.