Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Write the america method to reset each individual pixel's blue and red values to the average of that pixel's blue and red pixel values.

2. Write the america method to reset each individual pixel's blue and red values to the average of that pixel's blue and red pixel values. (IE if a pixel's red value is 200 and the blue value is 150, then the red and blue values of the pixel should be reset to 175 for both). Below, four method signatures from the Pixel class are provided, these will help you complete the task. A partial method has also been started below. Pixel int getBlue(): access the blue value (between 0-255) of the pixel int getRed(): access the red value(between 0-255) of the pixel void setBlue(int value) : reset the blue value to the parameter provided void setRed(int value): reset the red value to the parameter provided public void america() { Pixel[][] pix = this.getPixels2D; // write code below that will reset all blue and red values found in the 2D array of //pixels to the average of the blue and red values

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

What advancement barriers did Lisa encounter?

Answered: 1 week ago

Question

Discuss diversity management.

Answered: 1 week ago

Question

Ability to work comfortably in a team environment

Answered: 1 week ago

Question

Exposure to SQL desirable but not required

Answered: 1 week ago