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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:50
Given int variables k and total that have already been declared, use a while loop to compute the sum of the squares of the first 50 counting numbers, and store this value in total. thus your code should put 11 + 22 + 33 + + 4949 + 50*50 into total. use no variables other than k and total.
Answers: 2
question
Computers and Technology, 23.06.2019 06:10
The head restraint should be adjusted so that it reaches a.the top of your ears b.the base of your skull c.the top of the head
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Now you’re on your own. include a short summary of this section with plots in your lab report. write a matlab script file to do steps (a) through (d) below. include a listing of the script file with your report. 1 the soundsc(xx,fs) function requires two arguments: the first one (xx) contains the vector of data to be played, the second argument (fs) is the sampling rate for playing the samples. in addition, soundsc(xx,fs) does automatic scaling and then calls sound(xx,fs) to actually play the signal. mcclellan, schafer, and yoder, dsp first, 2e, isbn 0-13-065562-7. prentice hall, upper saddle river, nj 07458. c 2015 pearson education, inc. 4 mcclellan, schafer and yoder, signal processing first. prentice hall, upper saddle river, new jersey, 2003. c 2003 prentice hall. (a) generate a time vector (tt) to cover a range of t that will exhibit approximately two cycles of the 4000 hz sinusoids defined in the next part, part (b). use a definition for tt similar to part 2.2(d). if we use t to denote the period of the sinusoids, define the starting time of the vector tt to be equal to t , and the ending time as ct . then the two cycles will include t d 0. finally, make sure that you have at least 25 samples per period of the sinusoidal wave. in other words, when you use the colon operator to define the time vector, make the increment small enough to generate 25 samples per period. (b) generate two 4000 hz sinusoids with arbitrary amplitude and time-shift. x1.t / d a1 cos.2
Answers: 1
question
Computers and Technology, 24.06.2019 03:00
With editing, word automatically displays a paste options button near the pasted or moved text. a. cut-and-paste b. drag-and-drop c. inline d. copy-and-carry
Answers: 1
You know the right answer?
Hiring Policies After being promoted, you now have access to all student data in FooBar High School....
Questions
question
Mathematics, 03.02.2020 04:05
Questions on the website: 13722359