Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We have declared a method called crop with one char[][] parameter art and four int parameters leftX, rightX, topY, and bottomY. TASK: Fill in the

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

We have declared a method called crop with one char[][] parameter art and four int parameters leftX, rightX, topY, and bottomY. TASK: Fill in the body of the crop method such that it returns the result of cropping art in the rectangle bounded by the corners (leftX, topY), (leftX, bottomY), (rightX, topY), and (rightX, bottomY), inclusive, wrapped in a frame of asterisks (*). HINT: The top-left corner of art is the point (0,0), which is art[0][0]. HINT: The first dimension of art is the vertical dimension. For example, art[0] is the first row of art. Gollum ASCII art originally created by Shanaka Dias Sample Input: 10 18 1 5 *** |_' _' /\ ;a/ e= J/- ' " ;- \./ ) L~" ' -; )' -.'") \ --\{`', --/ (- |_'- .- \j\L\ Ccc. .=' / |\7 ******* ** Sample Output: *********** */-' -' * *;a/ e= J/* *\ ~- * L~"'. *********** Write a program, test using stdin stdout Time limit: 8 seconds Memory limit: 256 MB 1 static char[][] crop(char[][] art, int leftX, int rightX, int topY, int bottomY) { // YOUR CODE HERE 3 } 4 8. 1 point per submission

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

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

ISBN: 1583474013, 978-1583474013

More Books

Students also viewed these Databases questions

Question

7. How does each of these characters achieve epiphany?

Answered: 1 week ago

Question

b. Explain how you initially felt about the communication.

Answered: 1 week ago