Coded the getVotes method

includes javadoc