Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please provide a java eclipse program that does the following: Given a 2D array of characters, you are to convert every character that * appears

please provide a java eclipse program that does the following: Given a 2D array of characters, you are to convert every character that * appears between the two exclamation points to upper case characters. You can * assume that if there are any exclamation points in the array, then there are * exactly two. There may be no exclamation points in the array. * * Hint #1: To determine character equality, you can do something like the * following: char c = '!'; if(c == '!') ... * * Hint #2: To convert a character to upper case, you can do the following: char * c = 'a'; c = Character.toUpperCase(c); //c will now be an upper case letter * * Hint #3: Be careful that you alter the characters directly in the input * array, you should not be creating a new array. * * Example 1: input = [ [a, b, c, d] [e, !, f, !] ] * * When finished, the array should be: input = [ [a, b, c, d] [e, !, F, !] ] * * * Example 2: input = [ [a, b, !, c, d, e] [f, g, h, i, j, k] [l, m, !, n, o, p] * ] * * When finished, the array should be: input = [ [a, b, !, C, D, E] [F, G, H, I, * J, K] [L, M, N, !, o, p] ] * * * Example 3: input = [ [!, a, b] [c, d, !] ] * * When finished, the array should be: input = [ [!, A, B] [C, D, !] ] * * * Example 4: input = [ [a, b, c, d] [e, f, g, h] ] * * When finished, the array should remain unchanged since there are no * exclamation points * * Example 5: input = [ [a, b, c, !] [d, e, f, g] [!, h, i, j] ] * * When finished, the array should be: input = [ [a, b, c, !] [D, E, F, G] [!, * h, i, j] ] * *

public static void uppercaseExclamation(char[][] input) {

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_2

Step: 3

blur-text-image_3

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

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

Year Project R Project S 0

Answered: 1 week ago