package p2Kirk;

public class Name {
	
	// Instance Variables
	private String 
				firstName,
				middleName,
				lastName;
	
	//No args constructor
	Name() {}
	
	//Main Constructor using all private variables
	Name (
			String firstName,
			String middleName,
			String lastName) 
	{
		this.firstName = firstName;
		this.middleName = middleName;
		this.lastName = lastName;			
	}
	
	// get first name
	public String getFirstName () 
	{
		return firstName;
	}
	
	// get middle name
	public String getMiddleName () 
	{
		return middleName;
	}
	
	// get last name
	public String getLastName () 
	{
		return lastName;
	}
	
	// Change full name to uppercase
	public void nameToUpper() 
	{
		firstName = firstName.toUpperCase();
		middleName = middleName.toUpperCase();
		lastName = lastName.toUpperCase();
	}
	
	// Override toString method
	public String toString() 
	{
		return lastName + ", " + firstName + " " + middleName;
	}
}
