Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write functions: numWords - Given a string, return the number of words it contains. A word is defined to be a sequence of alphabetic (isalpha)

Write functions:

numWords - Given a string, return the number of words it contains. A word is defined to be a sequence of alphabetic (isalpha) characters with non-alphabetic characters on each side. If alphabetic characters start or end the string, they are considered a word. The best method to solve this is to use the isalpha function to determine the beginning and end of each string.

characterCounts - Given a string, return a vector of ints of length 26 containing the number of times each letter was seen. Index 0 corresponds to a, 1 to b, etc Treat upper-case letters as lower-case.

convertToUpper - Given an input string convert all alphabetic characters to uppercase. Return a new string converted to uppercase. If the input string is empty just return the input string.

string convertToUpper(const string &to_be_converted){ // TODO: Fill me in

}

unsigned int numWords(const string &countme){ // TODO: Fill me in }

vector characterCounts(const string &countme){ // TODO: Fill me in }

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

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions

Question

Create an argument for Freuds greatest legacy ?

Answered: 1 week ago

Question

Presentations Approaches to Conveying Information

Answered: 1 week ago