I am very much a beginner in programming, so this maybe nothin but this error keeps popping up and i'm unsure why.
cannot find symbol - constructor Track
this is my source code and its a work in progress.
public class Track
{
private String name;
private String creator;
private String type;
private String number;
private int length;
public Track(String trackName, String artistCreator, String genreType, String referenceNumber, int trackLength)
{
this.name = trackName;
this.creator = artistCreator;
this.type = genreType;
this.number = referenceNumber;
this.length = trackLength;
}
public String getName()
{
return name;
}
public String getCreator()
{
return creator;
}
public String getType()
{
return type;
}
public String getNumber()
{
return number;
}
public void changeNumber(String newReferenceNumber)
{
//number = newReferenceNumber;
int size = newReferenceNumber.length();
if (size >= 3)
{
number = newReferenceNumber;
}
else
{
System.out.println("------------------------------------------");
System.out.println("Please enter a three digit number.");
System.out.println("------------------------------------------");
}
}
public int getLength()
{
return length;
}
public void viewTrack()
{
System.out.println("------------------------------------------");
System.out.println(" " +"Track name:" +" " + name);
System.out.println(" " +"Artist name:"+ " " + creator);
System.out.println(" " +"Genre:"+ " " + type);
System.out.println(" " +"Length:"+" " + length);
System.out.println(" " +"Reference Number:"+" " + number);
System.out.println("------------------------------------------");
}
}
public class Playlist
{
private ArrayList<Track> tracks;
private int nextTrackNumber;
public Playlist()
{
tracks = new ArrayList<Track>();
nextTrackNumber = 1;
}
public Track addTrack()
{
tracks.add(new Track());
}
public int numberOfTracks()
{
return tracks.size();
}