Question: 5. COMPDATA data set in Fig. 5shows the revenue and profit for 10 companies. The first column is the company name, second column and third

 5. COMPDATA data set in Fig. 5shows the revenue and profit

5. COMPDATA data set in Fig. 5shows the revenue and profit for 10 companies. The first column is the company name, second column and third column are revenue and profit in million dollars, respectively. Answer the following questions (Show source code and result using screenshots. Note that screenshots must include your ID): (1) Write COBOL code to find the min, max, and average revenue (20 points, for COMP4910 students) (2) Write COBOL code to sort in descending order (use bubble sort algorithm), by using revenue as a key. Show the sorting result on the screen (10 points, for COMP5900 and ENCS 7060 students) (3) For the sorting result in above, save the Company Name and revenue (not include profit) in COMPRANK data set. (10 points, for COMP5900 and ENCS 7060 students) EDIT KCO2720.COMP.COMPDATA =COLS> -------- -1- +----2--------3----+ ********* ********** ***** Topo 000100 Chrysler 2071.6 18.5 000200 Esnark 2510.8 19.1 000360 General Electric 2959.1 212.6 000400 U.S. Steel 3250.4 195.4 000500 Exxon Mobil 5661.4 584.8 000600 General Motors 9823.5 806.0 000700 Armour 2056.1 1.6 000800 Gulf Oil 1705.3 182.8 000900 Mobil 1703.6 183.8 001000 Dupont 1687.7 344.4 ****** **** **** Bottom Fig. 5 5. COMPDATA data set in Fig. 5shows the revenue and profit for 10 companies. The first column is the company name, second column and third column are revenue and profit in million dollars, respectively. Answer the following questions (Show source code and result using screenshots. Note that screenshots must include your ID): (1) Write COBOL code to find the min, max, and average revenue (20 points, for COMP4910 students) (2) Write COBOL code to sort in descending order (use bubble sort algorithm), by using revenue as a key. Show the sorting result on the screen (10 points, for COMP5900 and ENCS 7060 students) (3) For the sorting result in above, save the Company Name and revenue (not include profit) in COMPRANK data set. (10 points, for COMP5900 and ENCS 7060 students) EDIT KCO2720.COMP.COMPDATA =COLS> -------- -1- +----2--------3----+ ********* ********** ***** Topo 000100 Chrysler 2071.6 18.5 000200 Esnark 2510.8 19.1 000360 General Electric 2959.1 212.6 000400 U.S. Steel 3250.4 195.4 000500 Exxon Mobil 5661.4 584.8 000600 General Motors 9823.5 806.0 000700 Armour 2056.1 1.6 000800 Gulf Oil 1705.3 182.8 000900 Mobil 1703.6 183.8 001000 Dupont 1687.7 344.4 ****** **** **** Bottom Fig. 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!