8A

Write the class OliverPics This class encapsulates an ArrayList of Pictures in a class and provides methods to process the list.

The constructor takes an ArrayList of Pictures as a parameter and uses it to initialize the instance variable.

Provide the methods

Define and use a local constant for GAP. "Local" means you will define it in the draw method.

Note: There is a second version of the remove method that will remove a specific object.

Here is the code to remove target from the ArrayList called stuff

stuff.remove(target);

Provide Javadoc

For the draft, implement the the constructor and the draw() method. Include Javadoc

The pictures are in this zip, oliver_pics.zip. Download, unzip, and put the pictures in the Bluej project folder

8A draft:
8A final:

8B

Complete the class PhraseBook which has an ArrayList of strings as an instance variable and methods to act on the array list. Call the instance variable phrases

Provide a constructor that takes a ArrayList<String> as a parameter and assigns it to the instance variable

Provide methods:

Note: There is a second version of the remove method that will remove a specific object.

Here is the code to remove target from the ArrayList

phrases.remove(target);

Provide Javadoc

For the draft, provide the instance variable, the constructor and the averageLength() method. Implement the other methods as stubs (including Javadoc). Remember that the Javadoc for a stub should reflect what the method will do in the final version not what it does in the draft.

Here is the toString method. Add it to the draft. I intended to include it itn the Codecheck file but did not. (Added Apr 4, 2017)

    @Override
    public String toString()
    {
        return phrases.toString();
    }

8B draft:
8B final:

8C

Complete the class Tiles which manages an ArrayList of Rectangles. Each rectangle represents a ceramic floor tile. Tiles contains a constructor and methods to process the rectangles

Provide a constructor that initializes the instance variable with an empty array list. Call the instance variable tiles.

Provide methods

Provide Javadoc

For the draft, provide the instance variable, the constructor, and the add method. Implement the other methods as stubs (including Javadoc). Remember that the Javadoc for a stub should reflect what the method will do in the final version not what it does in the draft.

8C draft:
8C final: