All pastes #493245 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-17 17:47 UTC
rendered paste body
public class BirdNode
{
	
	// Values for each Birds
	String birds;
	int count;
	BirdNode next;
	
	//Constructors for Birds
	public BirdNode(String b)	
	{
		birds = b;
		count = 1;
		next = null;
	}
	
	public BirdNode(String b, int c)	
	{
		birds = b;
		count = c;
		next = null;
	}
	
	
	// increase count of birds	
	public void setCount()	
	{
		count++;
	}
	
	// Returns the count of birds
	public int getCount()	
	{	
		return count;
	}
	
	// Returns name of Birds
	public String getBird()
	{
		return birds;
	}
	
	// Returns the data of the Birds
	public String toString()
	{
		return "Bird: "+birds+" Amount: "+count;
	}
	
}