Computers and Technology
Computers and Technology, 01.12.2020 16:50, jadenbun

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:40, StephiUnicorni
When running anti-virus software , what could be a reason where recipitent is not guaranteed that data being streamed will not get interrupted?
Answers: 1
image
Computers and Technology, 23.06.2019 00:20, mmmmaaarriiieeee
The open systems interconnection (osi) reference model: defines standards for many aspects of computing and communications within a network. is a generic description for how computers use multiple layers of protocol rules to communicate across a network. defines standards for wireless local area network (wlan) communication protocols. details the advantages and disadvantages of various basic network cabling options.
Answers: 1
image
Computers and Technology, 23.06.2019 10:00, thezbell
What is estimated time of arrival (eta)? a device that measures the acceleration (the rate of change of velocity) of an item and is used to track truck speeds or taxi cab speeds a gps technology adventure game that posts the longitude and latitude location for an item on the internet for users to find a north/south measurement of position the time of day of an expected arrival at a certain destination and is typically used for navigation applications
Answers: 3
image
Computers and Technology, 23.06.2019 16:30, jessisjawsome
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
Answers: 1
Do you know the correct answer?
Hiring Policies After being promoted, you now have access to all student data in FooBar High School....

Questions in other subjects:

Konu
Mathematics, 14.01.2021 19:30
Konu
Mathematics, 14.01.2021 19:30