/****************************************************************************************
 * A Person interface
 *
 * An interface can define:
 *     Constants:       those are fields that are public, static and final
 *     Methods:         Those are public and abstract emthods,  
 *                      They must be implemented by one or more subclasses.
 *     default Methods: Those methods will have implementation code 
 *
 * If a subclass does not implement all the abstart methods, it must also be abstract
 *
 ****************************************************************************************/

public interface APerson
{
    /**
     *  interface constants
     *  By default these are:  public  static  final  (no need to define as such)
     */

    String MALE   = "M";
    String FEMALE = "F";

    /**
     *  interface methods 
     *  By default these are:   public  abstract  (no need to define as such)
     *  All methods must be implemented in subclasses.
     */

    String getFullname( );              
    String getGender( );
    int    getAge( );

    /**
     *  interface default methods
     *  A default type of a method can have implementation code
     */

    static String toLive( )             //static method with code 
    {
        return("Must breath air");
    }

    default String earnMoney( )         //default instance method with code 
    {
        return("Must work");
    }
}