Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions

Question

2. Are my sources up to date?

Answered: 1 week ago