subject

Hiring Policies After being promoted, you now have access to all student data in FooBar High School. Your task is to parse through student information and decide which class would be the best for FooBar Incorporated's upcoming targetted hiring project (only the best, most sinister minds make it!). Beware, FooBar is extremely evil and are looking for the most lucrative class of CS majors. You should write two methods, determineMajor and report Statistics. The determineMajor method takes in a Scanner containing file data as a parameter and returns an integer array that contains the number of CS majors in each class standing. For this array (of size 4) the indices represent the year that a student is. That is, index o represents freshmen, index 1 represents sophomores, index 2 represents juniors and index 3 represents seniors. Your input file for this program (hiring_info. txt ) will always be in the format of class-standing major and you can always assume that these exist in pairs with cs always being capitalized. For instance hiring_info. txt could look like, Sophomore English Senior CS Senior cs Junior Electrical Senior History Sophomore CS Freshman Informatics For this input file, a call to determineMajor (Scanner input) looks like Scanner input = new Scanner(new File("hiring_info. txt")); int[] counts = determineMajor (input); After this code is executed, counts would store: To, 1. 0 21 [0, 1, 0, 2] because there are o freshmen that are CS majors, 1 sophomore that is a CS major, o juniors that are CS majors and 2 seniors that are CS majors. The reportStatistics method should then format output from this array. A call to reportStatistics (int[] counts, PrintStream output) such as reportStatistics(counts, output); should print out all the information to a PrintStream object. Specifically, it should report how many CS majors each class has and the suggested class to hire, which is the class with the most CS majors. You may assume that two classes will not both share the largest number of CS majors. For example, with this same input file, the output file would look like Freshman class has o cs Majors Sophomore class has 1 cs Majors Junior class has o cs Majors Senior class has 2 CS Majors Suggested Hire: Senior class Make sure that your PrintStream produces this output in the exact same format

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:30, Margieeee
Asalesman at a high end computer security firm want to sell you a proactive cover for your passport, which contains an rfid tag inside storing your sensitive information. the salesperson's solution cost only $79.99 and protects your passport from being read via radio waves while it is in your pocket. explain how you can achieve the same thing under $3.00
Answers: 3
image
Computers and Technology, 22.06.2019 10:00, adam4449
Jackson is teaching the decimal number system. he wants his students to know how to expand numbers by powers of 10. which is the correct order in which digits are assigned values in the decimal number system?
Answers: 1
image
Computers and Technology, 22.06.2019 21:40, tdahna0403
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
image
Computers and Technology, 23.06.2019 00:00, addisonrausch
What season was better from fortnite?
Answers: 2
You know the right answer?
Hiring Policies After being promoted, you now have access to all student data in FooBar High School....

Questions in other subjects: