Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Java Program Help!!!!!!

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Thanked 0 Times in 0 Posts

    Exclamation Java Program Help!!!!!!

    Hiiii Everyone!!

    I'm hoping there's someone here that can help solve this java program of mines. I need to write a java program for a school project on a school election. I'm a beginner at java programming.

    I need the program to do these things:
    Details of the Candidates eg. Name, Surname, Address, and Telephone number.

    Grade of the class, and the names of all the students in the class.

    Name of educator and contact details.


    Counting all votes per a candidate.

    Sort the votes from highest to lowest.

    Calculate the statistics in percentage form.

    Search for candidates details.

    Search for the names of candidates and who they were nominated by.

    Calculate the 2nd and 3rd place winners.


    Display the number of votes with candidates’ names.

    Display all details of a candidate.

    Display results from highest to lowest.

    Display the results in percentage form.

    Display the total number of votes.

    I've got the Input part done just the rest is really tough to get around, I'd really appreciate any help/any pointers to get me headed in the right direction!

    Thank You..

    *I posted this in the wrong place the last time, hope I didn't do it again!*

  2. #2
    Super Moderator pbrockway2's Avatar
    Join Date
    Jan 2012
    Thanked 206 Times in 182 Posts

    Default Re: Java Program Help!!!!!!

    Have a plan: that is figure out how - in natural language, not computer code - how you are going to assemble and process the information you need. Write it down and be able to explain it. Imagine you were giving instructions to a person who was going to act as "election overseer" and manually do the tallying. If such instructions aren't clear to you, ask about that, saying what difficulties you are having.

    When it comes to code write one small step at a time. Compile (addressing the compiler messages) and test (dealing with any unexpected output) as you go. Again if there are messages or output (including runtime exceptions) that you don't understand, you will have a specific question to ask.


    That advice is *very* general and it's hard to be more specific based on what you've posted.

    Is your code expected to make use of classes to represent students, teachers, candidates etc? Are you familiar with searching and sorting - ie have you seen them in other contexts? Is this application intended to work at the command line? or have a graphical user interface? Collections of things are involved (candidates, students, etc): what sorts of collections have you used before? arrays? lists?

    These are the sorts of questions that I would imagine are floating about in the minds of others reading your post. Rather than lots of details of the question (which seems rather straight forward and step-by-step) we need to know more about you and where you're at.

    [Edit] I've just seen we're in the OOP forum ... so that answers one of my questions! Once you have the plain-language description of the process, think about what classes you will need and especially what each of their behaviour (methods) are.

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    So. Maryland, USA
    My Mood
    Thanked 698 Times in 680 Posts

    Default Re: Java Program Help!!!!!!

    the rest is really tough to get around
    To help, we need to understand what you've done so that we can give pointers on how to either improve or expand what you've done to easily complete the rest of the assignment, AND we need to understand what about the rest of the assignment is "really tough" to you. If you've designed the input part keeping the process and output parts in mind, those parts shouldn't be "really tough." If you didn't design the input part for the process and output requirements, then I can imagine how those parts seem difficult.

    Let us see what you've done, and we can go from there.

  4. #4
    Join Date
    Jul 2013
    Thanked 5 Times in 4 Posts

    Default Re: Java Program Help!!!!!!

    please rather than shooting in the air....give us a something to work on....atleast try to make some sort of code,which the members could help improve and correct if necessary

  5. #5
    Member llowe29's Avatar
    Join Date
    Jul 2013
    My Mood
    Thanked 5 Times in 5 Posts

    Default Re: Java Program Help!!!!!!

    We wont do your homework for you. That's called spoonfeeding. Did you even make an attempt.

Similar Threads

  1. Invoke a Java program with windows program
    By jackhard in forum Object Oriented Programming
    Replies: 1
    Last Post: February 21st, 2013, 07:16 AM
  2. convert java program to java ME program
    By abhishek1212 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: February 4th, 2013, 03:22 PM
  3. Replies: 1
    Last Post: July 8th, 2012, 10:23 AM
  4. how to run a java program..when the program using jar
    By miriyalasrihari in forum Java Theory & Questions
    Replies: 2
    Last Post: May 17th, 2012, 10:04 AM
  5. Java program to Add a JMenu toolbar to a Java Swing application
    By JavaPF in forum Java Swing Tutorials
    Replies: 6
    Last Post: March 6th, 2012, 12:25 PM