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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 22:00, mrnotsosmart744
Discuss the ways in which electronic information associated with payments is addressed in terms of security. include encryption, secure sockets layers, and secure electronic transactions in your discussion. are there any other ways that consumers and businesses can keep their payment information secure in an electronic commerce environment? do you feel that your information is safe when conducting electronic business? why or why not?
Answers: 1
image
Computers and Technology, 23.06.2019 08:30, Bradgarner772
Based on your knowledge of a good network, describe what you think is a perfect network would be. what kind of information and resources could users share on this network. what would the network administrator do? what kind of communication would be used?
Answers: 1
image
Computers and Technology, 23.06.2019 17:00, evanwall91
What does the faves button do? a. users mark a web page as a favorite b. leads other readers to favor a specific page c. readers sort and align their favicons, or favorite icons d. leads users to a message board where they can post questions
Answers: 1
image
Computers and Technology, 23.06.2019 22:30, meijorjay94p2u2zy
Apart from confidential information, what other information does nda to outline? ndas not only outline confidential information, but they also enable you to outline .
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 in other subjects:

Konu
Biology, 04.10.2021 16:10