Results 1 to 2 of 2
  1. #1
    judemartin99 is offline Member
    Join Date
    Feb 2013
    Posts
    12
    Rep Power
    0

    Default Sorting Bubble Help Java Tutorial Help

    You are given two 1-dimensional arrays. The first array contains vote counts for an election to determine the mayor of the city of Process, KY. The second array contains the last names of the candidates. The last name at element x of the second array relates to the vote count at element x of the first array.

    Create a method to sort the vote count array in descending order. Adjust the last names array so that the vote counts still relate to the last
    name.

    Once sorting is completed, display the winner and his/her vote count. (I think bubble sorting would work best)

    I need help on how to start it and end it, Can you explain to the process I must follow and do

    thanks

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    United States
    Posts
    3,336
    Rep Power
    5

    Default Re: Sorting Bubble Help Java Tutorial Help

    There are lots of examples of sorting on the web. And the bubble sort, though generally inefficient, would be a good start. Check out Wikipedia. Once you get your code written, compiled, and running, post it here for help with any problems.

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

Similar Threads

  1. Bubble Sort Java help!
    By incxx in forum New To Java
    Replies: 2
    Last Post: 03-24-2013, 08:00 PM
  2. Replies: 0
    Last Post: 06-04-2012, 06:07 PM
  3. Replies: 0
    Last Post: 04-06-2012, 08:24 PM
  4. BuBBle Sorting
    By Bgreen7887 in forum New To Java
    Replies: 6
    Last Post: 03-28-2011, 10:03 PM
  5. Bubble Sort in Java
    By Java Tip in forum Algorithms
    Replies: 0
    Last Post: 04-15-2008, 07:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •