Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 438 Weeks Ago, 2 Days Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Programming Posted 22 May 2017 My Price 7.00

The voting district in which you live is partitioned into five precincts

The voting district in which you live is partitioned into five precincts. Write a program that reads the election results from each of these precincts and tabulates the total vote in your district for all of the candidates running for election. The program should begin by asking the user to enter the number of candidates, nmbrCandidates, running for office. It should then read the election returns for each precinct for each candidate, compute the total vote for each candidate, and display the input and the results in the form shown in the table.

For each candidate, the program should also compute and display the percentage of the total vote. If there is one candidate whose percentage is better than 50 percent, display a message declaring that candidate to be the winner of the election. If there is no such candidate, display out a message indicating the names of the top two vote-getters and indicate that a run-off election will be required. The voting data should be stored in an indexed collection of structured elements, each of which contains the name of a candidate, the number of votes in each precinct for that candidate, and the total vote. The relevant information about each candidate should be modeled by a class containing the definitions of the necessary attributes and functions required for one candidate.

Test your program for the data shown below and also when candidate C receives only 108 votes in precinct 4.

 

Answers

(8)
Status NEW Posted 22 May 2017 11:05 AM My Price 7.00

-----------

Attachments

file 1495451678-Answer.docx preview (804 words )
T-----------he -----------vot-----------ing----------- di-----------str-----------ict----------- in----------- wh-----------ich----------- yo-----------u l-----------ive----------- is----------- pa-----------rti-----------tio-----------ned----------- in-----------to -----------fiv-----------e p-----------rec-----------inc-----------ts.----------- Wr-----------ite----------- a -----------pro-----------gra-----------m t-----------hat----------- re-----------ads----------- th-----------e e-----------lec-----------tio-----------n r-----------esu-----------lts----------- fr-----------om -----------eac-----------h o-----------f t-----------hes-----------e p-----------rec-----------inc-----------ts -----------and----------- ta-----------bul-----------ate-----------s t-----------he -----------tot-----------al -----------vot-----------e i-----------n y-----------our----------- di-----------str-----------ict----------- fo-----------r a-----------ll -----------of -----------the----------- ca-----------ndi-----------dat-----------es -----------run-----------nin-----------g f-----------or -----------ele-----------cti-----------on.----------- Th-----------e p-----------rog-----------ram----------- sh-----------oul-----------d b-----------egi-----------n b-----------y a-----------ski-----------ng -----------the----------- us-----------er -----------to -----------ent-----------er -----------the----------- nu-----------mbe-----------r o-----------f c-----------and-----------ida-----------tes-----------, n-----------mbr-----------Can-----------did-----------ate-----------s, -----------run-----------nin-----------g f-----------or -----------off-----------ice-----------. I-----------t s-----------hou-----------ld -----------the-----------n r-----------ead----------- th-----------e e-----------lec-----------tio-----------n r-----------etu-----------rns----------- fo-----------r e-----------ach----------- pr-----------eci-----------nct----------- fo-----------r e-----------ach-----------
1495451680-1845688_2_636309558119037752_sample-output.PNG
Not Rated(0)