Class Contact


  • public class Contact
    extends java.lang.Object
    Class to manage a contact object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int ContactID  
      (package private) java.lang.String ContactName  
    • Constructor Summary

      Constructors 
      Constructor Description
      Contact​(int contactID, java.lang.String contactName)
      Constructor for a contact
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getContactID()
      Return Contact ID
      java.lang.String getContactName()
      Return Contact Name
      void setContactID​(int contactID)
      Set contact id
      void setContactName​(java.lang.String contactName)
      Set the contact name
      java.lang.String toString()
      Overrides the .toString() function, so that a String representation of the object can be returned to the UI
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ContactID

        int ContactID
      • ContactName

        java.lang.String ContactName
    • Constructor Detail

      • Contact

        public Contact​(int contactID,
                       java.lang.String contactName)
        Constructor for a contact
        Parameters:
        contactID - Integer, contact id
        contactName - String, Contact name
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides the .toString() function, so that a String representation of the object can be returned to the UI
        Overrides:
        toString in class java.lang.Object
        Returns:
        The name of the contact as a String
      • getContactID

        public int getContactID()
        Return Contact ID
        Returns:
        Integer, contact id
      • setContactID

        public void setContactID​(int contactID)
        Set contact id
        Parameters:
        contactID - Integer, contact id
      • getContactName

        public java.lang.String getContactName()
        Return Contact Name
        Returns:
        String, Contact Name
      • setContactName

        public void setContactName​(java.lang.String contactName)
        Set the contact name
        Parameters:
        contactName - String, contact name