Home /
Expert Answers /
Computer Science /
please-do-it-in-c-language-nbsp-task-3-read-and-store-data-from-a-file-of-your-own-devising-y-pa171
(Solved): Please do it in C++ language
Task 3: Read and Store Data from a File of your own devising. Y ...
Please do it in C++ language
Task 3: Read and Store Data from a File of your own devising. You may also be required to manipulate the string data, using appropriate string methods. The data for the two individual collections can be found in MadLibData.txt, which you can modify or change to suit your method of reading and storing the data, instead of writing your own. You are free to write your own data, if you wish. Remember to name and store your text files as required by the brief. The data for the mad bits is currently written so that it identifies the types of words the user must input for its matching Mad Lib. The Mad Libs themselves have place holders for each word, which will be replaced by the user's input. - a NAME, a VERB ending in ING, a plural NOUN, a NOUN - WORD was WORD the WORD for their latest WORD. Task 4: Generate and Display a Random Mad Lib Your next task is generate a random Mad Lib, using 3 different elements from the mad libs collection, and ask the user to input appropriate words, using the associated mad bits and display the result as a concatenated or formatted string.
Here is the code for the question. Output shown for sample input. Please dont forget to rate the answer if it helped. Thank you very much. #include #include using namespace std; #define MAX 1000 class book { private: string name;