Question: Assignment 6.1: Really Long Words (10 pts) According to Grammarly.com, here are the 14 longest words in the English language. We are going to write

Assignment 6.1: Really Long Words (10 pts)

  • According to Grammarly.com, here are the 14 longest words in the English language.
  • We are going to write a program that prompts the user to enter a really long word and prints out some information about this word.
  • Open up a new Java file called Longest.java and add a Javadoc comment with your name and section information
  • Then declare a new Scanner variable to read in user input.
  • The program should then prompt the user for a really long word, and display the following information about it:
  1. It's length
  2. The index number of its first and last index
  3. Its first and last letters.
  • Note that your program should use the length() and charAt() methods given in class - or you will not receive credit for this assignment.
  • A word of advice: copy and paste your words from the Grammarly.com article to save the trouble of typing such long words into the console.
  • Once your program works identically to the sample output below, please upload it to Canvas:

Example Output: Your program must work identically, except user input of the word may vary:

Enter a really long word: pseudopseudohypoparathyroidism The length of pseudopseudohypoparathyroidism is 30 The first letter is at index 0, and the last letter is at index 29 The first letter is p The last letter is m

Alternately:

Enter a really long word: Antidisestablishmentarianism The length of Antidisestablishmentarianism is 28 The first letter is at index 0, and the last letter is at index 27 The first letter is A The last letter is m

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!