Color.WHITE
, sets the last color
to Color.BLACK
, and sets size to 10.
public ColorScale(Color first, Color last, int size)
get(int level)
. You may assume the level
passed is in the range 0 to size minus 1.
size()
.
~mikec/cs10/hw2/
at CSIL) to initially test the class.
This application uses CS10Display.class (from Assignment 1), so be sure a copy of that class
is in your default directory. Your results must match these
part 1 results from our solution.
final Color[] stockColors = { Color.BLACK, Color.BLUE, Color.CYAN, Color.DARK_GRAY, Color.GRAY, Color.GREEN, Color.LIGHT_GRAY, Color.MAGENTA, Color.ORANGE, Color.PINK, Color.RED, Color.WHITE, Color.YELLOW }; final String[] stockNames = { "BLACK", "BLUE", "CYAN", "DARK_GRAY", "GRAY", "GREEN", "LIGHT_GRAY", "MAGENTA", "ORANGE", "PINK", "RED", "WHITE", "YELLOW" };Remember to offer choice "14: Other" in the menu too.
turnin hw2@cs10 ColorScale.java ShowColorScale.java