Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please do part 2 & 3. dont do part 1 please do part 2 & 3. dont do part 1 5. COMPDATA data set in

please do part 2 & 3. dont do part 1
image text in transcribed please do part 2 & 3. dont do part 1
5. COMPDATA data set in Fig. Sshows 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 KCB2720.COMP.COMPDATA =COLS> ----+----1 -2---------3----+ *********** ****** Topo 800100 Chrysler 2071.6 18.5 000200 Esnark 2510.8 19.1 606300 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 Arnour 2056.1 1.6 000800 Gulf Oil 1705.3 182.8 000900 Mobil 1703.6 183.8 001000 Dupont 1687.7 344.4 ***** Bottom 10 Fig. 5 5. COMPDATA data set in Fig. Sshows 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 KCB2720.COMP.COMPDATA =COLS> ----+----1 -2---------3----+ *********** ****** Topo 800100 Chrysler 2071.6 18.5 000200 Esnark 2510.8 19.1 606300 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 Arnour 2056.1 1.6 000800 Gulf Oil 1705.3 182.8 000900 Mobil 1703.6 183.8 001000 Dupont 1687.7 344.4 ***** Bottom 10 Fig. 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

=+a. What kind of personality does the brand have?

Answered: 1 week ago

Question

Demonstrate how to use the Gaps Model for diagnosing and

Answered: 1 week ago

Question

Differentiate between hard and soft measures of service quality.

Answered: 1 week ago