hi so im super stuck on this part of my assignment, if anyone could help me get started id greatly appreciate it :)

Create a method that would return a 2D sub-array of a 2D array of integers. Given a location (i,j) and

two odd numbers dx and dy, return the sub-array centered at (i,j) extending from i-dx/2 to i+dx/2 and

from j-dy/2 to j+dy/2. Note: the previous divisions are integer divisions returning an integer; for

dx=dy=5, dx/2=dy/2=2.

Your method should have the header:

public static int [][] snip(int [][] a,int i, int j, int dx, int dy)

If i, j, i-dx, j-dy, i+dx, j+dy are out of bounds return null. For dx=3, dy=3 the indices should be:

(there is a matrix posted here but i cant seem to copy and paste, but the values in order starting from the top left going right are:

((i-dx/2),(j-dy/2)) (i,(j-dy/2)) ((i+dx/2),(j-dy/2))

((i-dx/2),j) (i,j) ((i+dx/2),j)

((i-dx/2),(j+dy/2)) (i,(j+dy/2)) ((i+dx/2),(j+dy/2))

does that make any sense??

THANK YOU!