Chat with us, powered by LiveChat Design and implement a program processes | Writedemy

Design and implement a program processes

Design and implement a program processes

Question
Design and implement a program processes voting data of presidential election for the country where the
said country consists of 4 states. At this time, there are 6 candidates are running for the position as seen
in the candData.txt text file. The results of the votes are sent to you for processing, see sample
in voteData.txt. It lists each candidate’s name and the votes they received by states. You should have a
nicely formatted output of the election results with the winner’s name printed.
voteData.txt
Your program driver should generate a randomly generated voteData based on the given candidate
names, random state selection ( 1 – 4 ), and random votes ( 0 – 50 ) per state.
You should generate 10,000 – 1,000,000 entries in the voteData.txt before processing the data. In your
design ( UML/Flowchart, UML/pseudo code ) have a BigO analysis for your algorithms ( where it applies )
and justify your selection of algorithms based on speed and storage characteristics.
Candidate

This class implements a candidate as an object.
( besides standard methods, implement the specific methods especially their
post condition requirements )
Methods

public void method_name_chsen_by_you(int state, int votes)

Method to set the votes of a candidate for a particular state.
Postcondition: The votes specified by the parameter votes are assigned to the state
specified by the parameter state.
public void method_name_chsen_by_you(int state, int votes)

Method to update the votes of a candidate for a particular state.
Postcondition: The votes specified by the parameter votes are added to the state
specified by the parameter state.
public boolean method_name_chsen_by_you(Candidate otherCan)

Method to determine if two candidates have the same name.
Postcondition: Returns true if the name of this candidate is the same as the name of the
candidate specified by the parameter otherCan.
public int method_name_chsen_by_you(Candidate otherCan)

Method to compare the names of two candidates.
Postcondition: Returns 0 if the name of this candidate is the same as the name
of otherCan; returns < 0 if the name of this candidate is less then the name of otherCan;
returns > 0 if the name of this candidate is greater than the name of otherCan.
ElectionResult

This class contains methods for processing voting data for presidential election.
( besides standard methods, implement the specific methods especially their
post condition requirements )
Methods

public static void method_name_chsen_by_you(Candidate list, int length)

Algorithm post condition: list objects are in ascending order.

public static int method_name_chsen_by_you(Candidate list, int
length,Candidate searchItem)
Algorithm post condition: If searchItem is found in the list,it returns the location
of searchItem; otherwise it returns -1.

To help you get started, here is a basic diagram of classes that you should design and
implement.

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order