Write a version that only decreases the red by 10%, and one that reduces red by 20%. Which seems to be more useful? Note that you can always repeatedly reduce the redness in a picture, but you don't want to have to do it too many times, either.

What will be an ideal response?


```
public void decreaseRed10P ( )
{
Pixel [ ] pixelArray = this.getPixels ( ) ;
int red = 0 ;
// loop through all the pixels
for ( Pixel currPixel : pixelArray )
{
red = c urrPixel . getRed ( ) ;
currPixel . setRed ( ( int ) ( red ยค 0 . 9 ) ) ;
}
}
public void decreaseRed20P ( )
{
{Pixel [ ] pixelArray = this.getPixels ( ) ;
int red = 0 ;
// loop through a ll the pixels
for ( Pixel currPixel : pixelArray )
{
red = currPixel.getRed ( ) ;
currPixel.setRed ( ( int ) ( red *0 . 8 ) ) ;
}
}
```

Computer Science & Information Technology

You might also like to view...

RAID level 3 performs ________ and incurs ________ storage overhead than RAID level 2

a) better, more b) worse, less c) better, less d) worse, more

Computer Science & Information Technology

Which of the following can be accomplished by using the dialog box in the accompanying figure?

A. add sharpness to artwork B. create a consistent texture across an image C. both a. and b. D. neither a. nor b.

Computer Science & Information Technology

If formulas located in other cells reference cells in a deleted row or column, Excel does not adjust these cell references but instead displays the ____ error message.

A. #NULL! B. #DIV/0! C. #N/A D. #REF!

Computer Science & Information Technology

One of the disadvantages of _____ methods of system development is that the overall project might be subject to scope change as user requirements change.?

A. ?object-oriented analysis B. ?agile C. ?structured analysis D. ?rapid application development

Computer Science & Information Technology