Better KorKorTor - skanakakorn/eth-nonode GitHub Wiki

Codes

Exercise

  1. Ensure only contract owner can add candidate, change candidate name. Test it.
  2. Do not allow the same voter to vote more than one time.
  3. Add function getWinner to return name and total score the winner get.
  4. Add function getVoteCount(string _candidateName) to find vote count for that candidate.
  5. Add function getVoteCountByID(uint _id) to get vote count for a candidate ID.
  6. Currently, when you vote, only 1 person get 1 vote. We want to give a voter 10 votes. Each voter can use that to vote for any candidate. Please modify this system to accomplish that.