subject

The data file occupations. txt in the canvas files for Week 1 is a plain text file containing information about employment in specific occupations in the United States from the US Dept. of Labor in May of 2018. This is real data compiled from wage and employment surveys. Each data set has four lines of information: • • • COS - The 6-digit Standard Occupational Classification (SOC) code for each occupation title - the title of the occupation employment - the number of people in the US employed on this occupation salary - the average salary for all people employed in the US in this occupation. Here is data from the middle of the file: 15-1132 Software Developers, Applications 903,160 108,080 15-1133 Software Developers, Systems Software 405,330 114,000 15-1134 Web Developers 127,300 75,580 15-1141 Database Administrators 110,090 92,030 Each set of data has one data item per line over four lines, starting with the line that has the COS code. For example, 15-1133 is the code for Software Developers, System; 405,330 people were employed in this occupation in the US at the time the data was collected; and they had an average annual salary of $144,000. The salaries are the average for all employees throughout the United States in each category. Starting salaries for recent graduates tend to be lower. Salaries for more experienced people in each category tend to be higher. Salaries can also vary throughout the country by location. Your task is to create a software package as a Java project that contains three classes: • an executable class for the project itself. This class should contain your main() method, with an instance of the OccupationList object in the main() method, but no array should be declared in the main() method, nor anywhere in the project class. • an Occupation class with the properties Cos, title, employment, and salary. This class should contain methods to manipulate properties of an Occupation, such as getting and setting the properties, along with a toString() method that will return a String with a line of information about an occupation. • an Occupation List class for a list of occupations as an array, with an Occupation array and the number of occupations in the list as properties. This class should contain the methods to manipulate the array of occupations, such as reading data into the array form a datafile, allowing the user to search the array, and printing the array (to the screen). The purpose of this assignment is to make sure you can work with data files, work with arrays, and create software with multiple classes. Your executable class (with the same name as the package) should contain a main() method, should instantiate an instance of the OccupationList class, and should call methods from other classes as needed to: . load the data from the data file into the array of occupations. • including the four properties for each occupation, with one occupation's print the list of occupations dtaa on each line. • a method that asks the user for a COS code, then either displays the data for that code, or says the code list. If you would like, you can create a method that does this by title. Only one of these search functions us needed, but you could have more than one. Remember -- there should be no array in the project class or the Occupation class. The Occupation List class should contain the array of Occupation objects and the methods to manipulate the array. The main() method should call methods from the other classes as needed. You may either ask the user for the name of the data file or hard code it into the project. Either is acceptable. Your method to read data into the file should work independently of the exact number of data items in the file, so you should use a while loop that counts how many items it reads in as it loads the array. An Occupation array of 1,000 should be sufficient. This will let your software work with any list that has up to 1,000 items. The next page has an example from a different project of one way to set up the read loop: count = 0; while (infile. hasNextLine()) { // read data from the file into temporary variables // read Strings directly; parse integers inName = infile. nextLine(); in Type = infile. nextLine(); inPrice = Integer. parseInt( infile. nextLine()); InRent = Integer. parseInt( infile. nextLine()); InColor = infile. nextLine(); // initialize an element in the square array using the BoardSquare class constructor square[i] = new BoardSquare(inName, inType, in Price, in Rent, inColor); // increment the number of squares in the array count++; } // end while // the method returns count as an integer. Each class should be in its own file, within the same package in the same project. You should submit the finished Intelli project folder for this assignment. Please contact me if you have any questions or run into any trouble. Canvas messaging is the best way to contact me.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 01:00, lusciousl
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan. in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan. out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
image
Computers and Technology, 23.06.2019 01:30, anggar20
Which tab is used to change the theme of a photo album slide show? a. design b. view c. transitions d. home
Answers: 1
image
Computers and Technology, 23.06.2019 02:50, bfell92
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
image
Computers and Technology, 23.06.2019 10:00, karissanichole18
Install and use wireshark program ( send back screen shots and other vital information) case project 3-2: decode a tcp segment in a wireshark capture in this chapter, you walked through tcp segment to interpret the data included in its header. in this project, you use wireshark to capture your own http messafes, examine the tcp headers, and practice interpreting the data you'll find there. 1. open wireshark and snap the window to one side of your screen. open a browser and snap that window to the other side of your screen so you can see both windows.
Answers: 2
You know the right answer?
The data file occupations. txt in the canvas files for Week 1 is a plain text file containing inform...

Questions in other subjects:

Konu
Health, 05.08.2020 17:01