title: Python(3.6)-How can I create a demo program that will create an object from the VotingMachine class I have created?
body: <p>This is what I have so far. I have created this class:</p>
  
  <pre><code>class VotingMachine :
      def __init__(self):
          self._voteCount = 0
          self._totalVote = 0
  
      def DemVote(self, vote):
          self._voteDemCount = self._voteDemCount + 1
          self._totalDemVote = self._totalDemVote + vote
  
      def RepVote(self, vote):
          self._voteRepCount = self._voteRepCount + 1
          self._totalRepVote = self._totalRepVote + 1
  
      def getDemTally(self):
          return self._totalDemVote
  
      def getRepTally(self):
          return self._totalRepVote
  
      def clear(self):
          self._voteCount = 0
          self._totalVote = 0
  </code></pre>
  
  <p>and this is what I have so far for the demo program.</p>
  
  <pre><code>from votingmachine import VotingMachine
  
  print("Presidential Election")
  print("---------------------")
  print("R -- Republican")
  print("D -- Democrat")
  print("X -- Stop")
  
  userInput = input("Enter your vote (R/D/X): ")
  </code></pre>
  
  <p>My instructions for this are as follows-</p>
  
  <p>Create a voteDemo program that will create one object from the VotingMachine class. The voteDemo program should display a menu, allow the user to enter multiple votes until an X is entered, then show the tally of the Democratic and Republican votes, and also show which candidate won the election.<br>
  Make sure to consider that the election could end in a tie.</p>
  
  <p>I know I have probably missed something really simple, but I am a complete beginner at this and do not understand how to go about calling the methods to be able to display a menu, etc. I would really appreciate it if someone would take the time to explain what I need to do to finish this up.</p>