Question
You are given the large file experiments.txt which contains data about each science experiment with the format below. Experiment 01,1,11824,1562,2,6738544,78569214,3,252,698,4,4568,56997,5,21786,98211 Experiment 02,1,361,788,2,154,106,3,815,253,4,387,644 Experiment 03,1,228,164,2,6527,3389,3,20046,850,4,6387,2251 etc...
You are given the large file experiments.txt which contains data about each science experiment with the format below.
Experiment 01,1,11824,1562,2,6738544,78569214,3,252,698,4,4568,56997,5,21786,98211
Experiment 02,1,361,788,2,154,106,3,815,253,4,387,644
Experiment 03,1,228,164,2,6527,3389,3,20046,850,4,6387,2251
etc...
The data is ordered as, Experiment, trial, Successful attempts, Failed attempts. Repeating...
As a scientist, you are given the task to create a c++ program where for each experiment, you are going to print one hundred S's or F's. The S's will be on the left and the F's will be on the right. The goal is to use the letters to appear to be a chart. You will determine how many S's and F's you will be outputting by following the example for Experiment 01 below.
For Experiment 01, trial 01 has 11824 Success's and 1562 Failed attempts. Therefore 88% (11824 / (11824 +1562) = 0.883311(always round down to the nearest integer)) of trial 01 are successful attempts and 12% of trial 01 are failed attempts. Hence, your graph will output 88 S's followed by 12 F's for trial 01.
Below is an example output of how this program should work where the bolded words are user inputs.
Welcome Back!
Opening Experiments...
Enter Experiment: Experiment 01
Finding Experiment 01...
Enter Command: Graph Data
Trial: 1
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSFFFFFFFFFFFF
Trial: 2
SSSSSSSSSSSSSSSSSSSSSSFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
etc...
Enter Command: Exit
Thank you
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started