Question: 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

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!