Source of NameInterface.java


  1: /**
  2:    An interface for a class of names.
  3:    
  4:    @author Frank M. Carrano, Timothy M. Henry
  5:    @version 5.0
  6: */
  7: public interface NameInterface
  8: {
  9:    /** Sets the first and last names.
 10:        @param firstName  A string that is the desired first name.
 11:        @param lastName   A string that is the desired last name. */
 12:   public void setName(String firstName, String lastName);
 13:   
 14:    /** Gets the full name.
 15:        @return  A string containing the first and last names. */
 16:    public String getName();

 18:   public void setFirst(String firstName);
 19:   public String getFirst();

 21:   public void setLast(String lastName);
 22:   public String getLast();

 24:   public void giveLastNameTo(NameInterface aName);

 26:   public String toString();
 27: } // end NameInterface