Examples Input 4 word localization internationalization pneumonoultramicroscopicsilicovolcanoconiosis Output word 110n i18n p43s Requested files Solution.java 1- public class Solution { public static...




  • Consider the example of input and output that  are given in the first picture. It is just one example.


  • The whole code must have the structure as shown in the second picture.


  • Code must use abbreviate() method as part of solution


Examples<br>Input<br>4<br>word<br>localization<br>internationalization<br>pneumonoultramicroscopicsilicovolcanoconiosis<br>Output<br>word<br>110n<br>i18n<br>p43s<br>Requested files<br>Solution.java<br>1- public class Solution {<br>public static void main(String[] args) {<br>// add your code here<br>// code must use abbreviate() method as part of solution<br>}<br>2 -<br>4<br>6.<br>private static String abbreviate(String word) {<br>// add your code here<br>}<br>8<br>9<br>10<br>

Extracted text: Examples Input 4 word localization internationalization pneumonoultramicroscopicsilicovolcanoconiosis Output word 110n i18n p43s Requested files Solution.java 1- public class Solution { public static void main(String[] args) { // add your code here // code must use abbreviate() method as part of solution } 2 - 4 6. private static String abbreviate(String word) { // add your code here } 8 9 10
Instructions:<br>Sometimes some words like

Extracted text: Instructions: Sometimes some words like "localization" or "internationalization" are so long that writing them many times in one text is quite tiresome. Let's consider a word too long if its length is strictly more than 10 characters. All too long words should be replaced with a special abbreviation. This abbreviation is made like this: we write down the first and the last letter of a word and between them, we write the number of letters between the first and the last letters. That number is in decimal system and doesn't contain any leading zeroes. Thus, "localization" will be spelled as "1On", and "internationalization» will be spelled as "il8n". You are suggested to automatize the process of changing the words with abbreviations by using the Java program that implements the static method capitalization((). At that, all too long words should be replaced by the abbreviation and the words that are not too long should not undergo any changes. Input The first line contains an integer n (1sns100). Each of the following n lines contains one word. All the words consist of lowercase Latin letters and possess the lengths of from 1 to 100 characters. Output Print n lines. The i-th line should contain the result of replacing of the ith word from the input data.
Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here