ITP109_Lab6 - class Put your own data into them You do not...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ITP 109 Lab 6 Goal You will begin using classes and objects. Assignment Create a new project called Lab6 . Create a new Java class called Person . This class will have the following private attributes (as Strings): First Name Last Name Email Phone In the Person class, create accessor (or get) methods and mutator (or set) methods for the attributes. Also create a method called getName that returns the full name (first and last names) in a String. Create a new Java class called Lab6 to test our Person class. In the main method of the Lab6 class, create three instances of the Person
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: class. Put your own data into them. You do not need to prompt the user. • Use the Scanner class to ask the user to enter a last name in which to search for a person. Find the person instance and print out all of the person's information to the console window. • Make sure to comment your code. Grading - 15 points total • 5 points: Person attributes and methods • 5 points: Creating Person instances in Lab6. • 5 points: Searching and finding a person. • If you do not comment your code, points will be deducted....
View Full Document

This note was uploaded on 10/15/2008 for the course ITP 109x taught by Professor Trinagregory during the Spring '08 term at USC.

Ask a homework question - tutors are online