Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description: Write a program with the class name Strings Analysis. Allow the user to enter a String of any length. Next, the user will then

Description: Write a program with the class name Strings Analysis. Allow the user to enter a String of any length. Next, the user will then enter a letter. Next, the user will then enter a index number. Your program will test the following:

What is the String length?

What is the index of the letter?

What letter is at the index number?

Make sure that your program can handle indexes that are larger than the String, and letters that do not exist. Print Not Valid for slot numbers or letters that are not in the String.

Below is the input and the output we expect from your program. This is to help you know if you are on the right track. To test this Post Lab we might enter many Strings and letters and numbers.

Example input :

Hi this is a String that is being inputted

t

8

Example output:

ID002

Please enter a String: [String]

Enter a letter: [String, but turned into a char]

Enter a slot number: [integer]

The String length is: 42

The slot number of letter t is: 3

The the letter at slot 8 is: i

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

8. Design office space to facilitate interaction between employees.

Answered: 1 week ago