Difference between revisions of "Contact class lab assignment"
From WLCS
m (Reverted edits by Ysukivewug (talk) to last revision by Admin) |
|||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Contact class === | === Contact class === | ||
Create a Contact class using the following specifications (HINT: Use your Person or Car class as a template): | Create a Contact class using the following specifications (HINT: Use your Person or Car class as a template): |
Revision as of 13:40, 29 November 2010
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