subject

Write a program Election that computes the tally in a write-in election, and announces the winner. Since the votes are write-in, there is no pre-determined set of
candidates. Whoever appears the most in the votes is the winner. The user enters the
individual votes, one vote per line, and ends entering with typing -1 or an empty line. To
Page 7 of 8
compute the tally, the program uses two arrays, a String [ ] variable (names), and an int
[ ] variable (count). Upon receiving a single vote, the program checks if the name on the
vote appears in names, and if it does, the program adds 1 to the value of the element in
count. If the name does not appear in names, the program extends both arrays by one
element, stores the name in names at the last position and store 1 in count at the last
position. In this manner, the two arrays will have the same lengths. The initial length is 0
for both arrays.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Aletter or menu command that starts an action when the user presses the designated letter and the alt key together is called what?
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Type the correct answer in the box. spell all words correctly. 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: 3
question
Computers and Technology, 22.06.2019 23:30
Which of the following is not a symptom of chronic fatigue syndrome
Answers: 2
question
Computers and Technology, 23.06.2019 09:10
Effective character encoding requires standardized code. compatible browsers. common languages. identical operating systems.
Answers: 1
You know the right answer?
Write a program Election that computes the tally in a write-in election, and announces the winner....
Questions
question
Mathematics, 11.09.2020 08:01
question
Biology, 11.09.2020 08:01
question
Mathematics, 11.09.2020 08:01
question
Mathematics, 11.09.2020 08:01
question
Mathematics, 11.09.2020 08:01
question
Mathematics, 11.09.2020 08:01
question
Mathematics, 11.09.2020 08:01
question
Biology, 11.09.2020 08:01
question
Social Studies, 11.09.2020 08:01
question
Mathematics, 11.09.2020 08:01
question
Mathematics, 11.09.2020 08:01
question
Mathematics, 11.09.2020 08:01
question
Social Studies, 11.09.2020 08:01
question
Mathematics, 11.09.2020 08:01
question
Mathematics, 11.09.2020 08:01
question
Mathematics, 11.09.2020 08:01
question
English, 11.09.2020 08:01
question
Social Studies, 11.09.2020 08:01
question
Mathematics, 11.09.2020 08:01
question
English, 11.09.2020 08:01
Questions on the website: 13722363