import java.io.*;

// This class represents a pet owner in the Veterinary system
public class Owner implements Serializable
{
	private String name;		// owner's name
	private String address;		// owner's billing address
	private Pet[] pets;		// owner's pets

	// default constructor
	public Owner()
	{
	}

	// parameterized constructor
	public Owner (String name, String address, Pet[] pets)
	{
		this.name = name;
		this.address = address;
		this.pets = pets;
	}

	// return owner name
	public String getName()
	{
		return name;
	}

	// return all pets
	public Pet[] getPets()
	{
		return pets;
	}

	// return the pet with a particular name
	public Pet getPet(String petName)
	{
		for (int i = 0; i < pets.length; i++)
		{
			if (pets[i].getName().equals (petName))
				return pets[i];
		}
		return null;
	}
}