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.

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

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions