Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework 11A: voter.py You are asked to write a Primary Election Computerized Ballot Program using Object Oriented Programming Write a class named Voter with data

image text in transcribed

image text in transcribed

Homework 11A: voter.py You are asked to write a Primary Election Computerized Ballot Program using Object Oriented Programming Write a class named Voter with data attributes for A person's firstname; .A person's lastname; .A person's ID number; A Boolean data attribute indicating whether the voter is in favor of or opposed to Proposition A . Include a voter Subclass called Democrat with the data attributes: .Boolean data attribute indicating if the voter is in favor of Candidate B .Boolean data attribute indicating if the voter is in favor of Candidate C. Include a voter Subclass called Republican with the data attributes: Boolean data attribute indicating if the voter is in favor of Candidate D. Note that Independent Voters will belong to the Voter Class and will only be able to vote on Proposition A, While Democratic Voters will belong to subclass Democrat and will not only be able to vote on Proposition A, but also on Candidates B and C And Republican Voters will to subclass Republican and will not only be able to vote on Proposition A, but also on C You will need to call this program: voter.py, but it should have your name in the module Homework 11B: casting_vote.py Write a program called: YourName-Hwrk11b.py .The program will then ask you for your LMC ID number. . Then the program will ask you whether you are for or against Proposition A. After that it asks you if you are an: (Independent); or R (Republican); or D (Democrat); 0 If you answer 'T', then no further questions are asked and all the attributes of the SuperClass Voter, to which you belong, are printed to screen

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions