Question: need code for the following 1. Copy and paste the Student class code from last week into WK5 Class project. Add two constructors to the

need code for the following
need code for the following 1. Copy and paste the Student class
code from last week into WK5 Class project. Add two constructors to

1. Copy and paste the Student class code from last week into WK5 Class project. Add two constructors to the class: one that takes no arguments and another that takes two arguments. Test your class by creating a Student object called s1 with the constructor that takes two arguments and using its accessor anti mutator methods. 2. Add a Java Class file called Voting Machine.java to WK5Class project. Implement a Voting Machine class that can be used for a simple election. A voting machine has two properties-republican votes and democrat votes Write a constructor that accepts no arguments and sets the votes for both parties to o Write methods (note that none of these methods take any arguments or return any values) void clearl) to reset the votes for each party to 0 void vote Dem that increases the democrat votes by 1 void voteRepl) that increases the republican votes by 1 void print Votest that prints the tallies of the votes for both parties in . this way: Republican Votes: 6 Democrat Votes: 10 Identify the accessor methods (access/read/gets properties) and mutator methods (change/modify/sets properties) Test your class: Create a voting machine object called vm1. Then vote for each party multiple times by calling the vote Red and voteReg methods multiple times and then print the votes received by each party by using the priot Votes method. Then clear the votes by using the clear method and reprint the votes of each party. public class Student { 3 Student (double d, int i, String jack) { throw new Unsupported OperationException } L void printObject() { throw new Unsupported OperationException } void setAge(int i) { throw new Unsupported OperationException(" } void setGpa ( double d) { throw new Unsupported OperationException ("N } 7 8 29 9 30 }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!