Computers and Technology

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)

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 03:10, victoriadorvilu
This program reads a file called 'test. txt'. you are required to write two functions that build a wordlist out of all of the words found in the file and print all of the unique words found in the file. remove punctuations using 'string. punctuation' and 'strip()' before adding words to the wordlist. write a function build_wordlist() that takes a 'file pointer' as an argument and reads the contents, builds the wordlist after removing punctuations, and then returns the wordlist. another function find_unique() will take this wordlist as a parameter and return another wordlist comprising of all unique words found in the wordlist. example: contents of 'test. txt': test file another line in the test file output: ['another', 'file', 'in', 'line', 'test', 'the']
Answers: 1
image
Computers and Technology, 22.06.2019 23:30, ansonhunter8891
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
image
Computers and Technology, 23.06.2019 09:00, jeremytheprimerapper
Which best compares appointments and events in outlook 2010appointments have a subject man, and events do notappointments have a specific date or range of dates, and events do notappointments have a start and end time of day, and events do notappointments have a location option, and events do not
Answers: 2
image
Computers and Technology, 23.06.2019 13:00, jaelynnm
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
Do you know the correct answer?
The Big Blue Something Company only sells blue things. The quality control engineer has set up a mac...

Questions in other subjects:

Konu
Social Studies, 09.04.2021 19:00
Konu
Mathematics, 09.04.2021 19:00