Create an Election and an ElectionUI Class as described in the attached UML.

Words: 244
Pages: 1
Subject: Uncategorized

Create an Election and an ElectionUI Class as described in the attached UML. The Election Class should have the following data members1) string candidatesNames[]2) int votes[]3) constant holding number of candiates (5 names are fine).Methods and properties within the Election class included the following:The ElectionUI class will need the NUMOFCANDIDATES so use a property to return the value of the constant.SetCandidateName(string values, int index) will set the name in the internal array.SetVote(int cvotes, int index) will set the votes for each candidate.GetCandidateName(int index) return the name of the candidate.GetCandidateVotes(int index) returns the votes for that candidate.FindWinner will loop through the array of votes and returns the winner of the election.TotalVotes returns the sum of the votes—-For the ElectionUI class, do the following:Create an Election Class object called theElectionMainMethod will PromptforString and PromptforInt for each Candidate name and votes.Then DisplayResults will loop through the array displaying the Name Votes PercentageLastly the Winner is DisplayedComments from Customerforgot to mention.

Let Us write for you! We offer custom paper writing services Order Now.

REVIEWS


Criminology Order #: 564575

“ This is exactly what I needed . Thank you so much.”

Joanna David.


Communications and Media Order #: 564566
"Great job, completed quicker than expected. Thank you very much!"

Peggy Smith.

Art Order #: 563708
Thanks a million to the great team.

Harrison James.


"Very efficient definitely recommend this site for help getting your assignments to help"

Hannah Seven