Hellow i have confused because i have first to but in the same arraylist to kind of objects Cds and DVDs is the two objects, When finished with the introduction should appropriate methods respectively for the cd and dvd to distinguish from the original arraylist <VideoClub> to pick out the objects and to pass Joined own Arraylist <Cd> and Arraylist <DVD>
I can not figure out how to do this, if someone can help me.
I can not figure out how to do this, if someone can help me.
abstract class VideoClub{
ArrayList <VideoClub> vd=new ArrayList<VideoClub>();
protected String kind;
protected String date;
public VideoClub(String kind, String date){
this.kind=kind;
this.date=date;
vd.add();
}
}
public class Cd{
ArrayList <Cd> cd=new ArrayList<Cd>();
private String artist;
public VideoClub(String kind, String date,String artist){
super(kind,date);
this.artist=artist;
cd.add();
}
//set and get and cd methods
}
public class DVD{
ArrayList <DVD> dvd=new ArrayList<DVD>();
private boolean blueray;
public VideoClub(String kind, String date,boolean blueray){
super(kind,date);
this.blueray=blueray;
dvd.add();
}
//set and get and cd methods