Answered step by step
Verified Expert Solution
Question
1 Approved Answer
com/webapp/blackboard/content/listContentjspicourse id 260384 1&content.id-.14175795 18mode reset Attached Files Lab4Template bt (479 B) This assignment includes an outline of the program in the attached file You
com/webapp/blackboard/content/listContentjspicourse id 260384 1&content.id-.14175795 18mode reset Attached Files Lab4Template bt (479 B) This assignment includes an "outline" of the program in the attached file You have to fill in many of the details This assignment is the first that contains Optional Challenges. Skipping t them will not lower your grade Completing them will not raise your grade. They are there in case you want to challenge yourself. Requirements 1 Prompt the user for the number of words to be entered 2 Use new to allocate an array of that number of std strings. What kind of pointer do you need? 3. Use a for loop to read in each word from the keyboard using gotline0. Ater the user enters a word, have your program automatically ADD A PERIOD AT THE END OF THE WORD This is called a "sentiner. A sentinel is a marker that can be used to indicate the end of data, in this case the end of the set of characters in the string 4 Atfter all the words have been entered, use a while loop nested in a for loop to count the number of characters in each word by counting characters until the sentnels reached 5 Display each word followed by the number of letters Optional Chalenge Compute and display the total number of letters across all words. Optionial Chailenge of allocating an array of strings, allocate an array of structs where each struct contains a string and a leter count Cheiblist 1 Uncheck the Create direatory for solution checkbox in the New Praject Dialog 2 Projectisolution named correctly 3 Correct comments at top 4 Consistent indentation (Use EditAdvanced/Format Document) 5 Good variable names 6 Overall neat organization Comments in cade explain whats being dofe For each new there should be la delete
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started