CS46A Spring 18

9A

Every place on earth has an elevation either at, above, or below sea level. Elevations range from Mount Everest (29,035 feet above sea level) to the Challenger Deep in the Mariana Trench (36,070 feet below sea level)

elevations from highest to lowest places on earth

Write a class SeaLevels to process an int array of elevations

The constructor takes an array of ints representing various elevations around the earth as a parameter

Provide the following methods

provide Javadoc

For the draft, provide the instance variable, the constructor and the getCountBelowSeaLevel()method


9A draft:
9A final:

9B

Finish the StockExchangeArray class which manages Stock objects. . Its methods manipulate an array (not an ArrayList)

StockExchangeArray has an instance variable Stock[] Call the instance variable stocks. It has a constructor that takes an array of Stocks as a parameter and initializes the instance variable with it.

It has methods

(You can assume the array is not empty)

Provide Javadoc

For the draft, implement the constructor and the cheapest method. cheapest is similar to the methods in 8c. That processed an ArrayList. This work with an array. If you used the enhanced for loop for that methods, 90% of your code will be the same. You can copy/paste.

9B draft:
9B final:

9C

Util2DInteger  manages a 2d array of ints. It has a constructor that takes a 2d array as a parameter and assigns it to the instance variable.

You will write the whole class.

Provide the constructor and instance variable.

Provide these methods

Provide Javadoc

For the draft, provide the constructor and the getLargest method. Implement the other methods as stubs. Remember that a stub for a boolean method returns false. Provide Javadoc. Remember the Javadoc should say what the method will do in the final not what it does in the draft.

9C draft:
9C final: