We started out the class with handing out the syllabus. Then we moved onto a brief poll of what students were comfortable using, Arrays, ArrayLists, Vectors.
We followed that up with an in class programming assessment to try and get a base line for where everyone is.
You were asked to write a class based on an array of objects.The Class was to contain the following methods:
Call it simple Collection
- An add method that inserted at the end of the list and would grow the list if the array was full
- A contains method which returns true if and only if equal to an object in the array and false otherwise
- A grow method to increase the length of the list if the array is full
public void add (Object o) { // insert code } public boolean contains(Object o) { // insert code } private Object[] grow() { // insert code }
This is to be completed by class Friday if it was not completed in class on Wednesday. We will be learning how to turn it in Friday during class