Reference no: EM131320984
Assignment
MUST BE DONE ON BLUEJ
In this exercise you will create a simple VotingMachine. In the United States, when a candidate runs for office, the person is often identified as a Democrat, Republican, or Independent. Write a Java class (VotingMachine.java) which allows one to vote by party affiliation and will also allow us to query the number of votes for each party and who won the election. The behavior is given below:
VotingMachine vm = new VotingMachine();
vm.voteDemocrat();
vm.voteDemocrat();
vm.voteRepublican();
vm.voteIndependent();
vm.countDemocrat(); // returns 2
vm.countRepublican(); // returns 1
vm.countIndependent(); // returns 1
vm.whoWon(); // returns "Democrat"
For simplicity, you may assume that there will be no ties in this election.
Create a new project in BlueJ by clicking on the menu option Project > New project. This will create a folder with the project name (see below). All BlueJ project-related files for this project will be stored in this folder. Create new classes by clicking on the [New Class] button. All Java class files that you create (.java files) will be stored in the BlueJ project folder. The project folder will contain other files as well. After completing and testing your assignment, zip the entire BlueJ folder and submit it. Since your Instructor will need all files in the project folder, make sure you zip the entire folder. For this assignment the names of the BlueJ project, Java class files, and the zip file you submit are given below:
BlueJ project: voting_machine
Java files: VotingMachine.java
Submit the full zipped BlueJ project folder: voting_machine.zip
Targeting and growing the female market segment
: Should under amour continue targeting and growing the female market segment? Or should it target a broader population to gain more traction on Nike and get closer to the number one spot?Should Under Armour keep paying famous athletes to be part of..
|
When do researchers use regression analysis
: Distinguish among simultaneous (or standard), stepwise, and hierarchical regression.
|
Develop an action plan for creating your personal brand
: Describe what you want your personal brand to be. In the next step, you develop an action plan for creating or enhancing your personal brand. Provide at least one clear example of an experience in this course that has helped, or may help, you move to..
|
What line is described by a regression equation
: Write the general form of a regression equation that has a single predictor variable. Identify the criterion variable, the predictor variable, the regression constant, and the regression coefficient.
|
Write a java class which allows to vote by party affiliation
: Write a Java class (VotingMachine.java) which allows one to vote by party affiliation and will also allow us to query the number of votes for each party and who won the election.
|
What is the after-tax holding-period return on the bond
: A newly issued bond pays its coupons once annually. Its coupon rate is 5%, its maturity is 20 years, and its yield to maturity is 8%, and its face value is $1,000. Find the holding-period return for a 1-year investment period if the bond is selling a..
|
Write the pseudo code for the main program logic
: When a user specifies a price, find any seat with that price and give feedback on the seat row and number and mark the seat as "SOLD". Repeat the process until the user exits the program. Write the pseudo code for the main program logic.
|
Which is worse--confound variance or error variance why
: What are order effects, and how does counterbalancing help us deal with them?
|
Strategic decision partnering with the brotherhood
: Did vineyard vines make a good strategic decision partnering with the brotherhood of the traveling plants? How should vineyard vines proceed with its social media strategy?Was vineyard the right partnership for the brotherhood?
|