package Catalog;
public class Main
{
public static void main(String[] args)
{
Film[] myFilms = new Film[3];
Music[] myMusic = new Music[3];
ComputerProgram[] myComputerProgram = new ComputerProgram[3];
}
}
public class Item
{
protected String name;
protected String code;
protected String category;
protected String size;
public Item()
{
}
public Item(String name, String code, String category, String size)
{
this.name = name;
this.code = code;
this.category = category;
this.size = size;
}
public final String getName()
{
return name;
}
public final void setName(String value)
{
name = value;
}
public final String getCode()
{
return code;
}
public final void setCode(String value)
{
code = value;
}
public final String getCategory()
{
return category;
}
public final void setCategory(String value)
{
category = value;
}
public final String getSize()
{
return size;
}
public final void setSize(String value)
{
size = value;
}
}
public class Film extends Item
{
protected String director;
protected String mainActor, mainActress;
public Film()
{
}
public Film(String director, String mainActor, String mainActress)
{
this.director = director;
this.mainActor = mainActor;
this.mainActress = mainActress;
}
public final String getDirector()
{
return director;
}
public final void setDirector(String value)
{
director = value;
}
public final String getMainActor()
{
return mainActor;
}
public final void setMainActor(String value)
{
mainActor = value;
}
public final String getMainActress()
{
return mainActress;
}
public final void setMainActress(String value)
{
mainActress = value;
}
public final void Play()
{
}
public final void RetrieveInformation()
{
}
}
public class Music extends Item
{
protected String singer;
protected int length;
public Music()
{
}
public Music(String singer, int length)
{
this.singer = singer;
this.length = length;
}
public final String getSinger()
{
return singer;
}
public final void setSinger(String value)
{
singer = value;
}
public final int getLenght()
{
return length;
}
public final void setLenght(int value)
{
length = value;
}
public final void Play()
{
}
public final void RetrieveInformation()
{
}
}
public class ComputerProgram extends Item
{
}