Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We have declared a method called putCaption with one char[l[ ] parameter art, two int parameters row and col, and a String parameter caption. TASK:

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

We have declared a method called putCaption with one char[l[ ] parameter art, two int parameters row and col, and a String parameter caption. TASK: Fill in the body of the putCaption method such that it will overlay caption onto art such that the first character of caption is placed at art[row][col] and is surrounded by 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[o] is the first row of art. Gollum ASCII art originally created by Shanaka Dias Sample Input: Gollum 9 8 * ***************************************** * * * * T-'-'^ -- ;a/ e= J/-'" '. 1 ~_ ' -' ( ;-,. (~"'-. -. 1. ) '-- -; )' ( -.'") I ll | * * . .. * - * * * * 1.' -.-' " ; * '--'-, !!!! * --/ ( ;'.-' // /_'- * '"-" wiccc.' --.',' Tj\L\ * * * * .='/|\ * ***************************************** Sample Output: ***************************************** * * * * * * * L-'-'N ;a/ e= J/-'" '. 1 ~_ ' -' (ic,.. L~"'-. -. . ) '-- -; )' ( * * * * * * * * * * * * * * ********-' --!{"', IL *Gollum* -.-' " ; ! /********._'-, il --/ ( ;'.-' || /_'-.- '"-' ~' ccc.' --.',' Tj\L\ . ='/|\7 * * * * * * * * ***************************************** * * Write a program, test using stdin stdout Time limit: 8 seconds Memory limit: 256 MB N o 1 static void putCaption(char[][] art, int row, int col, String caption) { 2 || YOUR CODE HERE 3} N 00 1 point per submission. We have declared a method called putCaption with one char[l[ ] parameter art, two int parameters row and col, and a String parameter caption. TASK: Fill in the body of the putCaption method such that it will overlay caption onto art such that the first character of caption is placed at art[row][col] and is surrounded by 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[o] is the first row of art. Gollum ASCII art originally created by Shanaka Dias Sample Input: Gollum 9 8 * ***************************************** * * * * T-'-'^ -- ;a/ e= J/-'" '. 1 ~_ ' -' ( ;-,. (~"'-. -. 1. ) '-- -; )' ( -.'") I ll | * * . .. * - * * * * 1.' -.-' " ; * '--'-, !!!! * --/ ( ;'.-' // /_'- * '"-" wiccc.' --.',' Tj\L\ * * * * .='/|\ * ***************************************** Sample Output: ***************************************** * * * * * * * L-'-'N ;a/ e= J/-'" '. 1 ~_ ' -' (ic,.. L~"'-. -. . ) '-- -; )' ( * * * * * * * * * * * * * * ********-' --!{"', IL *Gollum* -.-' " ; ! /********._'-, il --/ ( ;'.-' || /_'-.- '"-' ~' ccc.' --.',' Tj\L\ . ='/|\7 * * * * * * * * ***************************************** * * Write a program, test using stdin stdout Time limit: 8 seconds Memory limit: 256 MB N o 1 static void putCaption(char[][] art, int row, int col, String caption) { 2 || YOUR CODE HERE 3} N 00 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

1583474013, 978-1583474013

More Books

Students also viewed these Databases questions