Name -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //********************************************************************** // Name.java // // Represents the full name of a person. //********************************************************************** public class Name { // Instance variables String firstName; String middleName; String lastName; //---------------------------------------------------------------- // Constructor - sets up a full name given the first, middle, and // last names. //---------------------------------------------------------------- public Name (String first, String middle, String last) { firstName = first; middleName = middle; lastName = last; } //---------------------------------------------------------------- // Returns the first name. //---------------------------------------------------------------- public String getFirst() { return firstName; } //---------------------------------------------------------------- // Returns the middle name....
View Full Document

Page1 / 2

Name -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online