Answered step by step
Verified Expert Solution
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 Computer and Information Analysts Computer Systems Analysts Information Security Analysts 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 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
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
Computer and Information Analysts
Computer Systems Analysts
Information Security Analysts
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 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started