The player class: Attributes: String firstName, lastName int idNumber, chips All
ID: 3638496 • Letter: T
Question
The player class:Attributes:
String firstName, lastName
int idNumber, chips
All attributes are private.
Constructors:
Three constructors:
1 - a default constructor – nothing in the parameters and every value blank or zero.
2 - A constructor with four parameters, first name, last name, idNum, chips
3 - A constructor with two parameters idNum and chips. Use scanner to have the user enter the first name and last name.
Methods:
The methods to be created are:
Getters and setters for each attribute.
o Getters (observer) returns the value of each attribute.
o Setters takes as input 1 parameter and sets the value of an attribute
? Additionally create three methods: addChips, subChips, displayPlayer
o addChips will take a integer parameter (int data type) and add it to the total chips;
o subChips will take an integer parameter (int data type) and subtract it from the total chips.
Explanation / Answer
.