Question: I need help implementing the following Java code package mini2; import api.ITransform; /** * Transformation implementing a smoothing operation * on cells of an array.

I need help implementing the following Java code

package mini2;

import api.ITransform;

/** * Transformation implementing a smoothing operation * on cells of an array. The new value is the * average of the values in a neighborhood * around a given cell, rounded to the nearest * integer. The size of the neighborhood is * 2 * radius + 1, where the radius is a parameter * provided to the constructor. * The isWrapped() method always returns false. */ public class SmoothingTransform implements ITransform { private int radius; public SmoothingTransform(int givenRadius) { radius = givenRadius; } @Override public int apply(int[][] elements) { // TODO return 0; }

@Override public int getRadius() { return radius; }

@Override public boolean isWrapped() { return false; }

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!