public class Flea extendsAnimal implements Cloneable
public Flea(string aName,string,aSpecies)
super("Flea") //Pass the type to the base
name=aName //Supplied name
species=aSpecies; //Supplied species
public void setName(string aName)
name=aName; //Change to the new name
public strund getspecies()
system.out.println(post)
//Pressent a fles's details as a string
public String tostring ()
return super.tostring( )+ \nIt's+name+the +species;
//Override inherited clone( ) to make it public
public object clone () throws CloneNotsupportedException
private string name //Name of fleal
private string species; //Flea species