Question: Given the following class, Player, Write code for the following: 1. [2 pts) a constructor with one parameter for name 2. (2 pts] a copy

Given the following class, Player, Write code for the following: 1. [2 pts) a constructor with one parameter for name 2. (2 pts] a copy constructor 3. [2 pts) a getter for score 4. [2 pts] a setter for name 5. [2 pts) a toString() method that returns a string with the name and score. public class Player private int score; private String name; Il your code here }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
