Question: Course: C++ Here down are given the data that you are supposed to copy and save them as a text file named xuniversity_bachelor
Course: C++
Here down are given the data that you are supposed to copy and save them as a text file named " xuniversity_bachelor " before you start to solve the problem. Please do not change anything in these data, otherwise there will be problems with the solution of the problem. The data start here down till the bold text at the bottom of the page.
Major Year Men Women
Civil-engineering 2007 85 23
Biomedical-engineering 2007 15 41
Software-engineering 2007 15 1
Industrial-engineering 2007 10 4
Electrical-engineering 2007 47 0
Management-and-Financial-engineering 2007 114 85
Computer-science 2007 151 27
Discrete-mathematics-and-Computer-science 2007 0 0
Mechanical-and-Industrial-engineering 2007 55 5
Mechanical-engineering 2007 45 2
Civil-engineering 2008 104 19
Biomedical-engineering 2008 26 60
Software-engineering 2008 21 1
Industrial-engineering 2008 1 0
Electrical-engineering 2008 44 1
Management-and-Financial-engineering 2008 118 111
Computer-science 2008 167 31
Discrete-mathematics-and-Computer-science 2008 0 0
Mechanical-and-Industrial-engineering 2008 58 7
Mechanical-engineering 2008 55 1
Civil-engineering 2009 102 17
Biomedical-engineering 2009 28 64
Software-engineering 2009 25 2
Industrial-engineering 2009 0 0
Electrical-engineering 2009 37 2
Management-and-Financial-engineering 2009 107 91
Computer-science 2009 191 31
Discrete-mathematics-and-Computer-science 2009 0 0
Mechanical-and-Industrial-engineering 2009 53 6
Mechanical-engineering 2009 50 1
Civil-engineering 2010 94 15
Biomedical-engineering 2010 33 51
Software-engineering 2010 37 3
Industrial-engineering 2010 1 1
Electrical-engineering 2010 32 2
Management-and-Financial-engineering 2010 85 65
Computer-science 2010 231 42
Discrete-mathematics-and-Computer-science 2010 0 0
Mechanical-and-Industrial-engineering 2010 67 10
Mechanical-engineering 2010 61 1
Civil-engineering 2011 69 10
Biomedical-engineering 2011 29 65
Software-engineering 2011 46 4
Industrial-engineering 2011 7 0
Electrical-engineering 2011 33 5
Management-and-Financial-engineering 2011 79 48
Computer-science 2011 272 48
Discrete-mathematics-and-Computer-science 2011 7 1
Mechanical-and-Industrial-engineering 2011 71 7
Mechanical-engineering 2011 65 1
Civil-engineering 2012 59 5
Biomedical-engineering 2012 31 72
Software-engineering 2012 61 8
Industrial-engineering 2012 10 3
Electrical-engineering 2012 37 5
Management-and-Financial-engineering 2012 67 46
Computer-science 2012 307 65
Discrete-mathematics-and-Computer-science 2012 11 3
Mechanical-and-Industrial-engineering 2012 98 10
Mechanical-engineering 2012 61 2
Civil-engineering 2013 53 6
Biomedical-engineering 2013 30 105
Software-engineering 2013 93 14
Industrial-engineering 2013 9 2
Electrical-engineering 2013 44 5
Management-and-Financial-engineering 2013 79 76
Computer-science 2013 413 97
Discrete-mathematics-and-Computer-science 2013 20 2
Mechanical-and-Industrial-engineering 2013 109 12
Mechanical-engineering 2013 50 1
Civil-engineering 2014 51 1
Biomedical-engineering 2014 32 87
Software-engineering 2014 77 26
Industrial-engineering 2014 8 3
Electrical-engineering 2014 48 5
Management-and-Financial-engineering 2014 92 97
Computer-science 2014 473 136
Discrete-mathematics-and-Computer-science 2014 29 6
Mechanical-and-Industrial-engineering 2014 95 15
Mechanical-engineering 2014 49 2
After you have created the text file, here is given the problem that needs to be solved using Codeblocks:


For example (how the run looks like):
Choose major:
0: Total
1: Civil-engineering
2: Biomedical-engineering
3: Software-engineering
4: Industrial-engineering
5: Electrical-engineering
6: Management-and-Financial-engineering
7: Computer-science
8: Discrete-mathematics-and-Computer-science
9: Mechanical-and-Industrial-engineering
10: Mechanical-engineering
6
Management-and-Financial-engineering: Number of students.
2007: 199
2008: 229
2009: 198
2010: 150
2011: 127
2012: 113
2013: 155
2014: 189
Another example:
Choose major:
0: Total
1: Civil-engineering
2: Biomedical-engineering
3: Software-engineering
4: Industrial-engineering
5: Electrical-engineering
6: Management-and-Financial-engineering
7: Computer-science
8: Discrete-mathematics-and-Computer-science
9: Mechanical-and-Industrial-engineering
10: Mechanical-engineering
15
Wrong choice, try again.
0: Total
1: Civil-engineering
2: Biomedical-engineering
3: Software-engineering
4: Industrial-engineering
5: Electrical-engineering
6: Management-and-Financial-engineering
7: Computer-science
8: Discrete-mathematics-and-Computer-science
9: Mechanical-and-Industrial-engineering
10: Mechanical-engineering
0
Total: Number of students.
2007: 725
2008: 825
2009: 807
2010: 831
2011: 867
2012: 961
2013: 1220
2014: 1332

The program should read through the file as often as you want or read the file once and store the information in the arrays.
Do type the correct code in the solution and paste images of its succesful run as in the examples above.
END
Course. Ctt E xerise The fle thet you eseated with the cbouc data, contains inor maton about the number sf students in some majors at XUniversdly. The fi ted byme with the aove le contains tour columns (separa spaees The fest aun is the name of he major, nedt frst Column is the name column is the year aud so is fhe number of men and so uwomen. Each name of majer is onl one word Chas been adaphtd by using beftueten words to form one word at the end The fist ine of the fle cortains he names f rn usinq be O columns. Wotk a program hat hacls to get the nome (and the path) the file, reads the infor matton ia the file and dis plays informatron about the at STar rite a proaram number of skedeore mjer ut h ha The user chooses
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
