anonymous
2008-04-10 20:19:16 UTC
For this assignment, you will write a method to create a color palette
The createPalette method takes one integer parameter, which is the blue value for the palette. You may assume that when the method is called, it will be with a value in the range 0 to 255 (i.e. a valid RGB color value). The method will be called on a Picture object. The createPalette method assumes that the Picture is at least 256 pixels in both width and height.The main method you create for this assignment should do four things.
Ask the user for a blue value to use in creating the palette.
Create a new Picture object that is 256x256.
Call the createPalette method on the picture object, passing the blue value parameter the method got from the user.
Display the palette picture.