Question: Create a function in C++ that loads in data from .txt file names that are inputted by the user. The data file(s) will contain a
Create a function in C++ that loads in data from .txt file names that are inputted by the user. The data file(s) will contain a list of experiment(s) which are all formatted the same way. Below is an example of how they will be formatted:
Experiment 01
The Little Albert Experiment
Trial 01 Failed
Trial 02 Passed
Trial 03 Passed
Trial 04 Failed
Trial 05 Passed
Trial 06 Passed
Trial 07 Passed
Experiment 01
Experiment 02
Stanford Prison Experiment
Trial 01 Failed
Trial 02 Passed
Trial 03 Passed
Trial 04 Failed
Trial 05 Passed
Trial 06 Passed
Trial 07 Failed
Trial 08 Failed
Trial 09 Failed
Trial 10 Passed
Experiment 02
Experiment 03
The Little Albert Experiment
Trial 01 Passed
Experiment 03
Ensure to store the total number of experiments (3 in this particular file), total unique experiments (2 in this particular file), and the total number of trials (18 in this particular file) to later use for later program requirements.
Example Input/Output (User input is in bold):
Welcome, Please Enter File:
Search Experiments.txt
Loading experiments.txt...
How would you like to proceed?
Display total of unique experiments
Total of Unique experiments: 2
How would you like to proceed?
Display total number of trials
Total trials: 18
How would you like to proceed?
Display total experiments
Total Experiments: 3
How would you like to proceed?
exit
Thank you for using Experiment Finder
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
