anonymous
  • anonymous
if anyone knows how to use Java please let me kno. there is noone in the chat for comp sci and i'm a math major with this for a prereq
Mathematics
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
chestercat
  • chestercat
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
dumbcow
  • dumbcow
its been awhile, im very rusty is this like a csc100 class?
anonymous
  • anonymous
intro to computer programming; Starting out with Java ours is labeled csci2000
dumbcow
  • dumbcow
yeah thats what i meant whats your question

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
You could have just posted the question in Comp Sci and waited a bit. I do tend to check in there now and then.
anonymous
  • anonymous
well there was literally NOONE in there so i felt i would be talking to myself but hold on and i will copy and paste it
anonymous
  • anonymous
Sometimes talking to yourself is helpful ;p
anonymous
  • anonymous
or do you have something to open it if i send the java file and i'll copy and paste what were doing. i dont kno what i'm doing wrong
anonymous
  • anonymous
haha funny funny LMAO
anonymous
  • anonymous
You can either post it to dpaste.com (my preference) or attach it to the question.
anonymous
  • anonymous
i posted it there under my screenname on here.... the instructions are Your program should output each candidate’s name, the number of votes received by that candidate, and the percentage of the total votes received by the candidate. Your program should also output the winner of the competition. Sample output is as follows: Finalist Votes Received % of Total Votes Johnson 5000 25.91% Miller 4000 20.72% Duffy 6000 31.09% Robinson 2500 12.95% Anthony 1800 9.33% Total 19300 The winner of the competition is Duffy. Specifications and Notes: Use the file specified above for input and the console for output. Main should primarily call methods to perform tasks. You should AT A MINIMUM have methods that do the following: 1. getVotes which reads the names and votes into parallel arrays 2. sumVotes which accepts the array of votes, a count of how many competitors were read in and returns the total votes 3. processVotes which accepts the array of votes, a count of how many items are in the array, an integer representing the total votes and fills a second array with the percentage votes for each finalist 4. determineWinner which determines the winner of the competition – you decide what needs to be sent in and returned.
anonymous
  • anonymous
this is the file on here too
anonymous
  • anonymous
When you post to dpaste.com you need to post here with the link to the page.
anonymous
  • anonymous
http://dpaste.com/535088/
anonymous
  • anonymous
Thanks =)
anonymous
  • anonymous
sorry never seen this site before
anonymous
  • anonymous
No thank YOU!!!!!
anonymous
  • anonymous
You don't seem to have any of the methods they describe above, and you're not actually storing the votes as you read them in.
anonymous
  • anonymous
You should have a method called getVotes that reads the votes from a file
anonymous
  • anonymous
I'm not sure what your input file looks like so I can't tell if you're doing that right, but it seems as though you are except you're not doing anything with the number you read in from the file.
anonymous
  • anonymous
i kno the way it is is the only way i could get it to print the stuff from the file. i can copy and paste the plain file text
anonymous
  • anonymous
Sure. But fundamentally it has a name, and a string right?
anonymous
  • anonymous
Johnson 5000 Miller 4000 Duffy 6000 Robinson 2500 Anthony 1800
anonymous
  • anonymous
err name and number
anonymous
  • anonymous
i completely suck at this and have no idea how i have gotten as far as i have in this class with a b but methods and arrays(ie these last two sections ) are kicking my butt
anonymous
  • anonymous
Ok, well you can think about arrays as variables that hold many values. In this case you'll want to have 2 arrays one for the name, and the other for the number of votes that candidate recieved.
anonymous
  • anonymous
Then you can organize them such that the i-th element in the name array corrisponds to the i-th element of the votes array.
anonymous
  • anonymous
so they shouldnt be in the same file?
anonymous
  • anonymous
I'm not talking about the file, I'm talking about your variables.
anonymous
  • anonymous
oh, before i go and erase all of what i've done, is there any part of it that is correct? that i should keep?
anonymous
  • anonymous
Some of it is, but before you do anything lets talk about what your plan is.
anonymous
  • anonymous
http://www.dabbleboard.com/draw?b=Guest662530&i=0&c=bb4c6b8835d51e52b82fa4015e989d4d192e8250 Join here so we can also draw some pictures.
anonymous
  • anonymous
ok
anonymous
  • anonymous
Ok so we have 2 arrays. One with names, one with votes.
anonymous
  • anonymous
okay i am in there under the name twignamanda
anonymous
  • anonymous
I don't see you anymore
anonymous
  • anonymous
i'm here and on that how do i invite you what name?
anonymous
  • anonymous
No, just click the link I have above.
anonymous
  • anonymous
You started your own.
anonymous
  • anonymous
ohhhhh ok my bad i thought i had to be on it so yea i signed up but clicking now

Looking for something else?

Not the answer you are looking for? Search for more explanations.