Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Written in C++ To help you practice functions, you will write a short program that asks the user to enter a string (get string() ),

Written in C++

image text in transcribed

To help you practice functions, you will write a short program that asks the user to enter a string (get string() ), then makes a copy of the string, and takes the copy and changes all non-space letters to dashes (set replace string()). The program then gets a letter from the user to search in the original string and replace the dashes in the copy string with the letter found, returning the number of letters found (geto search replace()). You should design first. You can have more functions, but you must have at least the three below with the EXACT function prototypes. Each of your functions should have the proper function headers/descriptions void get string (string &stratostore) ; void setepiace string(string copilusti, string &dash..stz); int get search replace (char c, string coplasti, string &dash str); Write the function headers/descriptions for each of the functions above, as well as all the functions you create. This includes information about parameters, return values, and pre/post conditions. . . Design - Give as much detail as possible for the main function and all the functions above. Why do the function prototypes have the specific parameter types on them? Why do the functions have void or a return value? How do all the functions interact together? What do you plan to use as bad values? Good values? What do you expect to happen with bad values? Good values

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

More Books

Students also viewed these Databases questions