Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.Write the columnProduct method, that will multiply all of the elements in a given column and return the product. public static double columnProduct(double [][] numbers,

1.Write the columnProduct method, that will multiply all of the elements in a given column and return the product.

public static double columnProduct(double [][] numbers, int col)

{

}

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

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions