(Solved) : Use Array Structures Structure Hold Occupation Name Total Number Employed Number Employed Q42697019 . . .

Use an array of structures. Each structure will hold theoccupation name, total number employed, and number of employedsusceptible to automation in that occupation.

  • Create a struct called Occupation with data members tostore name, total number employed (in thousands), and numbersusceptible to automation (in thousands).

  • Notice the return type on the findHigh and findLowfunctions below. They will return a variable of the structure datatype Occupation.

Your program MUST use the followingfunctions:

  1. Function loadData: The function reads and stores data inthe parallel array and 2D array from a text file(aidata.txt).  

void loadData(ifstream &infile, Occupation [], int&rows);

  1. Function findHigh: This function finds and returns theoccupation with the highest percentage of susceptibility ofautomation:

Occupation findHigh(Occupation occupations[], introws);

  1. Function findLow: This function finds and returns theoccupation with the lowest percentage of susceptibility ofautomation:

Occupation findLow(Occupation occupations[], introws);

Design Considerations

Please use a while loop to read all lines of text frominput file. Keep the input file in the same directory as yourproject.

aidata. txt:

Administrative 23081 13849
Agriculture 1060 594
ArtsEntertainment 2773 555
Business 8067 1129
Computer 4419 1635
Construction 6813 3407
Education 9427 1697
Engineering 2601 494
FacilitiesCare 5905 2893
FoodService 13206 10697
HealthPractitioner 8752 2888
HealthSupport 4316 1726
Legal 1283 488
Maintenance 5654 1187
Management 9533 2193
PersonalCare 6420 2183
Production 9357 7592
Protective 3506 1262
Sales 15748 6772
Science 1300 416
SocialService 2571 566
Transportation 10274 5651

Expert Answer


Answer to Use an array of structures. Each structure will hold the occupation name, total number employed, and number of employed …

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?