CS46A Fall 19

9A

Write a class EllipseManagerArray which manages Ellipse objects. This is similar to a problem in the last homework but using arrays rather than ArrayLists.

You will use the Ellipse in the Horstmann graphics package.

EllipseManagerArray has an instance variable Ellipse[]. Call the instance variable ellipses. The constructor takes and array of  Ellipse objects as a parameter.

Provide methods:

Provide Javadoc.

For the draft, define the instance variable and implement the constructor. Implement the average method.


9A draft:
9A final:

9B

In this problem you will write methods in an IntArray class to process integer arrays

The constructor for IntArray takes an int array as a parameter.

IntArray has these methods:

For the draft, implement the constructor and the smallest method.

9B draft:
9B final:

9C

In this problem you will create a class TicTacToeGame to model a tic-tac-toe game board. The board is represented by a 3 X 3 int array. Rather than X's and O's the players' positions are represented by integer constants

You will implement methods to process the array. You will not implement the whole game play.

The constructor takes a 2-d array as a parameter. The array contains integers indicating which spaces are marked by which player. The game may be complete or only partially complete at any one time.

Provide these method that process the array board

Output for getBoard

1 2 1
2 1 2
2 0 1

1 1 2
2 2 1
1 2 1

1 0 2
0 1 1
2 2 2

Provide Javadoc

Notice there are two tester programs for the final

For the draft, implement the constructor and declare the constants. Implement the counts method to return an array where all the values are 0. Implement the other methods as stubs. Provide Javadoc

9C draft:
9C final: