Understanding the class interface
In a programming language that has access control features, public methods are called the class interface. These are the methods that can be called from any other object in a system that has a reference to the object it wants to use. In Java, we can create a contract that will require any class that implements the contract, called an interface, to implement all the methods listed in the interface as public methods.
Here is an interface for reading and writing to a relational database:
public interface GamingDAO { // Create int create(Gamer gamer) throws SQLException; int create(Games games) throws SQLException; // Read List<Gamer> findAll() throws SQLException; Gamer findID(int id) throws SQLException; // Update int update(Gamer gamer) throws SQLException...