Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sorting Positions and Salaries Bubble Sorting Assignment The data file careers.txt contains a list of job titles and average annual salaries, such as: Computer and

Sorting Positions and Salaries
Bubble Sorting Assignment
The data file careers.txt contains a list of job titles and average annual salaries, such as:
Computer and Information Research Scientists
102190
Computer and Information Analysts
80460
Computer Systems Analysts
79680
Information Security Analysts
86170
Every two lines can be interpreted as a single logical record for a job position
The file has real data from the US Department of Labors May 2012 survey of occupations and wages. In this exercise you should create two parallel arrays, one for job and one for salary, and read data from the file into the arrays one line into the job array and then one line into the corresponding element in the salary array. Your program should sort the lists in parallel according to the values in the salary array, with the highest salary first. Sorting in parallel means that in your sort, if you swap two elements in the salary array, you must also swap the corresponding elements in the job array.
Your program should then display and print the list of jobs and corresponding salaries on the screen in a neatly formatted table, with comas in the salaries.. Use print Specifiers or formatting Classes in Java to format the output.
Submit a Lab Report for this assignment
Submit a zipped intellj Project Folder containing the assignment resources

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

Step: 3

blur-text-image

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

Which of the following is NOT a relational operator? 1. =

Answered: 1 week ago