PLease don't copy I need new code
c++
The acronym for a given string is formed by combining the firstletters from a series of words, as in this example: "self containedunderwater breathing apparatus" ==> "SCUBA".
Your program generates and displays the acronyms for each of thestrings in a data file named “acronym.dat”.
The output of your program should be of the followingformat:
Self contained underwater breathing apparatus ==> SCUBA
White anglo saxon protestant ==> WASP
……
North Atlantic Treaty Organization ==> NATO
The strings in the data file may have mixed upper and lowerletters. You may assume that no hyphen and underscore, and nopunctuation marks is present in the data file. The acronymsgenerated should all be in upper case letters. Your program outputshould have the exact format as shown above.
You are required to write a value-returning function to convertone line of characters into its corresponding acronym. Thisfunction needs to be called within a loop that reads lines ofcharacters from the data file one line at a time, and performs theacronym conversion.
acrynom.data
Self contained underwater breathing apparatusWhite anglo saxon protestantNorth Atlantic Treaty OrganizationDefense Advanced Research Projects AgencyLaugh Out LoudBy the wayBest Friends ForeverI Love YouIn my humble opinionOh my godWicked Evil GrinWish you were hereNational Science FoundationNational Institute Health
#include <iostream>using namespace std;
int main() {
return 0;}
1 describe/define each variable used in that module. Variablenames must be descriptive. Separate variable definitions fromvariable descriptions. Use the following form for this description:variable declared; // variable description in Englishsentence(s)
Properly indent all code according to descriptions given in“Indent C Programs”(http://www.cs.arizona.edu/~mccann/indent_c.html). You must beconsistent in the number of spaces used for indentation.
• To improve readability, use a moderate amount of white space,i.e., insert blank lines between blocks of code, and betweendifferent modules/functions.
• Comments need to be written for each logically related blockof code. This include a while or for loop, a if decision statement,a switch statement, a group of statements that compute a value, ablock of code that read in user data, a group of statements thatdisplays output, etc.
2 For each user defined function, comments need to be writtenabove the function describing:
o What does this function do?
o What are the expected input values?
o What are the expected return values?
PLease don't copy I need new code c++ The acronym for a given string is formed by combining the first letters from a ser
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am