Contact class lab assignment

From WLCS

Contact class

Create a Contact class using the following specifications (HINT: Use your Person or Car class as a template):

Attributes:

  • first name
  • last name
  • phone
  • address


Methods:

  • default constructor (no parameters)
  • specific constructor (firstName, lastName, and phone parameters)
  • getters (accessors)
  • setters (mutators)
  • toString()
    • For example: toString() should return something that says "John Doe - 703.867.5309"

ContactMain class

  • Create a separate class named ContactMain that contains a single main() method
  • Test your methods