Difference between revisions of "Contact class lab assignment"

From WLCS
 
Line 1: Line 1:
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://egebyromedu.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]=
 +
----
 +
=[http://egebyromedu.co.cc CLICK HERE]=
 +
----
 +
</div>
 
=== 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 06:58, 24 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