Question: IN C++ USE THE STEM.TXT I PROVIDED FOR THIS PROGRAM. PLEASE DO ALL THE REQUIREMENTS DOR THIS PROGRAM AND I WILL GIVE YOU THUMPS UP
IN C++
USE THE STEM.TXT I PROVIDED FOR THIS PROGRAM.
PLEASE DO ALL THE REQUIREMENTS DOR THIS PROGRAM AND I WILL GIVE YOU THUMPS UP
What percentage of men and women pursue STEM (Science, Technology, Engineering, Math) degrees? With your programming partner, you will complete a program that reads from a file called stem.txt and writes to an output file called stemout.txt. It does not store any data. But it uses loops and functions to read from the file and do some analysis. It calculates the percentage of men and women in each major and writes the name of the major, percentage men, and percentage women to the output file. Percentages should be printed to two decimal places.
You must ignore the first line in stem.txt, which is a header line. The function openFile() has been written for you. You must write the ratioCalc() function.
Optional: What other statistics can you calculate and add to the output file? Design a poster in Google slides to explain visually and upload.
STEM.TXT FILE Major-Code Major Major_category Total Men Women Annual Salary 2419 PETROLEUM-ENGINEERING Engineering 2339 2057 282 110000 2416 MINING-AND-MINERAL-ENGINEERING Engineering 756 679 77 75000 2415 METALLURGICAL-ENGINEERING Engineering 856 725 131 73000 2417 NAVAL-ARCHITECTURE-AND-MARINE-ENGINEERING Engineering 1258 1123 135 70000 2418 NUCLEAR-ENGINEERING Engineering 2573 2200 373 65000 2405 CHEMICAL-ENGINEERING Engineering 32260 21239 11021 65000 5001 ASTRONOMY-AND-ASTROPHYSICS Engineering 1792 832 960 62000 2414 MECHANICAL-ENGINEERING Engineering 91227 80320 10907 60000 2401 AEROSPACE-ENGINEERING Engineering 15058 12953 2105 60000 2408 ELECTRICAL-ENGINEERING Engineering 81527 65511 16016 60000 2411 GEOLOGICAL-AND-GEOPHYSICAL-ENGINEERING Engineering 720 488 232 50000 2410 ENVIRONMENTAL-ENGINEERING Engineering 4047 2662 1385 50000 2407 COMPUTER-ENGINEERING Engineering 41542 33258 8284 60000 5008 MATERIALS-SCIENCE Engineering 4279 2949 1330 60000 2404 BIOMEDICAL-ENGINEERING Engineering 14955 8407 6548 60000 2409 ENGINEERING-MECHANICS-PHYSICS-AND-SCIENCE Engineering 4321 3526 795 58000 2402 BIOLOGICAL-ENGINEERING Engineering 8925 6062 2863 57100 2412 INDUSTRIAL-AND-MANUFACTURING-ENGINEERING Engineering 18968 12453 6515 57000 2400 GENERAL-ENGINEERING Engineering 61152 45683 15469 56000 2403 ARCHITECTURAL-ENGINEERING Engineering 2825 1835 990 54000 3604 ECOLOGY Biology-And-LifeScience 9154 3878 5276 33000 6109 TREATMENT-THERAPY-PROFESSIONS Health 48491 13487 35004 33000 6100 GENERAL-MEDICAL-AND-HEALTH-SERVICES Health 33599 7574 26025 32400 3609 ZOOLOGY Biology-And-LifeScience 8409 3050 5359 26000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
