I'm currently having difficulty getting my new subclass to compile:
public class CompilationAlbum extends Album {
private String seriesOfAlbums;
public CompilationAlbum(String seriesOfAlbums) {
this.seriesOfAlbums = seriesOfAlbums;
albumType = "Compilation";
}
}
Can anyone point out what I'm doing wrong? The fault seems to lie with the constructor, but I can't see why that should cause an error. The error message also reads "actual and formal argument lists differ in length."
EDIT: The Album class, minus methods, looks like this:
import java.util.ArrayList;
public class Album {
private String name;
private ArrayList<Track> trackList;
private int length;
private int fileSize;
private double averageRating;
private String albumType;
public Album(String name){
this.name = name;
trackList = new ArrayList<Track>();
}