Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Ask the user to enter a product description as a sentence. If the user enters end or then end the program. Otherwise, parse the

Ask the user to enter a product description as a sentence.

If the user enters "end" or "" then end the program. Otherwise, parse the sentence into its component words, and do the following checks:

- Check that the first word is capitalized and that the sentence ends with a period. If not display a message.

- Check for any capitalized words in the sentence, other than the first word, and display those as names.

- Check for any words in the sentence that end with a period, and display those as abbreviations.

- Check the words to see if any contain both an open parentheses and a close parentheses and if so, display the text between them as the product code.

Extra Credit:

When the above checks are complete, ask the user for the next product description sentence.

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

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions