Difference between revisions of "Contact class lab assignment"
From WLCS
m (Protected "Contact class lab assignment" ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
|
(2 intermediate revisions by 2 users not shown) | |
(No difference)
|
Latest revision as of 13:43, 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