Question: need help c++ Problem 2: Write a C++ program named acronym.cpp. The acronym for a given string is formed by combining the first letters from
Problem 2: Write a C++ program named acronym.cpp. The acronym for a given string is formed by combining the first letters from a series of words, as in this example: "self contained underwater breathing apparatus" SCUBA". Your program generates and displays the acronyms for each of the strings in a data file named "acronym.dat". Copy the data file into your project directory. Assuming you have used "cd" commands to navigate to your project directory, then use the following command to copy the data file: $cp-cen/data/acronym.dat. notice the trailing period You are required to use Ch file stream type, and file operation functions (open, close, assert ...) for this assignment. You are not allowed to use file input redirect for this assignment. The output of your program should be of the following format: Self contained underwater breathing apparatus SCUBA White anglosaxon protestant WASP North Atlantic Treaty Organization NATO The strings in the data file may have mixed upper and lower letters. You may assume that no hyphen and underscore, and no punctuation marks is present in the data file. The acronyms generated should all be in upper case letters. Your program output should have the exact format as shown above You are required to write a value-returning function to convert one line of characters into its corresponding acronym. This function needs to be called within a loop that reads lines of characters from the data file one line at a time, and performs the acronym conversion
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
