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, 21.06.2019 17:00
How can data be added to a new table in data base
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
What are three software programs for mobile computing?
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
What are the 12 colors of the spectrum called?
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
Mathematics, 28.08.2019 02:40
question
Mathematics, 28.08.2019 02:40
Questions on the website: 13722367