Player
Learn how to create and manage a Player class.
We'll cover the following...
Let’s start with the Player
class.
Press + to interact
As observed in the UML diagram, the Player
class does not depend on other classes and can be constructed independently. Therefore, our starting point in the development process is to build this class.
As apparent, the code is not noteworthily complex. The only notable aspect is our use of an ArrayList
in the Player
and Main
classes to compile the player roster.
Note: The
Main
class acts as the client for thePlayer
class, serving as the environment for both constructing and testing the project. Always remember to test at each ...