public class CD extends Item
{
	private Artist[] artist;
	private int time;

	public CD()
	{
	}

	public CD(int id, String title, Artist[] artist, int time, int copy)
	{
		setID(id);
		setTitle(title);
		setNum_copies(copy);
		setHave();
		setArtist(artist);
		setTime(time);
	}

	public void setArtist(Artist[] artist)
	{
		this.artist = new Artist[artist.length];

		for (int i=0; i<artist.length; i++)
		{
			this.artist[i] = artist[i];
		}
	}

	public void setTime(int time)  {this.time = time;}


	public Artist getArtist(int i) {return artist[i];}
	public int    getTime()        {return time;}


	public String printItem()
	{


		String out = "";
		out+= " " + getID();
		out+= ", " + getTitle();

		for (int i=0; i<artist.length; i++)
		{
			out+=", " + artist[i].getName();
		}

		out+= ", time: " + getTime();


		if (getHave() == true)
		{
			out+=", on shelf - ";
		}
		else
		{
			out+=", checked out - ";
		}

		out+= getNum_copies() + " in stock";
		return out;
	}
}