Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

So I have those two parts , please fix the code so it capitalizes last character of each word in a sentence. Returns the string

image text in transcribedimage text in transcribedSo I have those two parts , please fix the code so it capitalizes last character of each word in a sentence.

Returns the string that results from capitalizing the last character of every word in the input parameter sentence, which is required to have at least one *character. For example, capitalizeLastCharactersInSentence("Hello there") * would return "0 therE You can assume that the sentence is a basic * English-style sentence with a single space between words. Replace this comment with your own Javados comment public static String capitalizeLastCharactersInSentence(String sentence) // Change or remove this statement as needed Scanner scan new Scanner (sentence); String output""; while (true) if (scan.hasNext )) output" output capitalizeLastCharacter(scan.next)); // destroy scan instance scan.close); return output; System.out.println("test for Begin capitalizeLastCharactersInSentence"); ystem.out.printnouttailatharactersinsentence(, ack) System.out.println(capitalizeLastCharactersInSentence("Hello, Jack")); System.out.println ("Output has to be: ") System.out.println (capitalizeLastCharactersInSentence(") System.out.println("End of the Tests

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

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions