subject

The Big Blue Something Company only sells blue things. The quality control engineer has set up a machine to spot check the colors of the items coming off the assembly line. The machine checks each item in several locations (from 2 to 100 locations per item), and it reports the color at each location. In order for an item to pass quality control, it must be blue in at least 50% of the locations. The first line of input contains the number of items that have been checked. Each other line contains the colors detected in a single item. The colors are separated by spaces. There is no space at the end of the line. You can assume that colors will be spelled with lower case letters (a-z). For each item, output whether the item "passed" or "failed" the quality control check. (5 points) Example input: blue red green blue blue orange red red green green red blue blue blue red blue blue red red orange blue Example output (corresponding to the example input above): Failed Passed Failed Passed failed Add the following methods to the class and use them in the main method: (10 points) a. setkthltem(k, item) that set the kth element of the array to the value given in "item". b. pickMaxIndex(arr, start, end) that returns the index of the largest value of the array from index start to index end. c. Swap(arr, index-i, index-j) that swaps the value in index i with the value in index j. d. selectionSort() that sorts the array in descending order, i. e. the largest one comes first Create a main method to test your program. (1 point)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
1.the index finger on your right hand types the f r v 4 j u m 7 h y 6 n lo.9 j u 7 m g t 5 b 2.if you need to multiply 400, 2, and 1 ½, what would you type on the numeric keypad? 400*2*1.5 400/2*1.5 400/2/1.5 400*2*1½ 3.select all examples of proper keyboarding technique. rest your fingers gently on the home row or home keys. slouch in your chair. rest your palms on the keyboard. relax your fingers. keep your hands lower than your elbows.
Answers: 1
question
Computers and Technology, 22.06.2019 10:00
What is a society that has moved to the internet rather than relying on physical media called
Answers: 2
question
Computers and Technology, 22.06.2019 16:00
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 3
question
Computers and Technology, 22.06.2019 23:00
In which part of a professional email should you try to be brief, but highly descriptive?
Answers: 1
You know the right answer?
The Big Blue Something Company only sells blue things. The quality control engineer has set up a mac...
Questions
question
Biology, 11.03.2021 14:00
question
Biology, 11.03.2021 14:00
question
Mathematics, 11.03.2021 14:00
question
Mathematics, 11.03.2021 14:00
question
Chemistry, 11.03.2021 14:00
question
Mathematics, 11.03.2021 14:00
question
World Languages, 11.03.2021 14:00
question
Mathematics, 11.03.2021 14:00