You have to provide a contructor in ContainsDescription
that takes the parameters of your superclass.
You have to combine them:
public class ContainsDescription extends Attachments
{
private String description;
public ContainsDescription(String description, String filename, int kilobytes)
{
super(filename, kilobytes);
this.description = description;
}
}
If you don't, it will not be able to construct the superclass.
If you really only want a constructor that takes a Description
as argument you can provide default values:
public class ContainsDescription extends Attachments
{
private String description;
public ContainsDescription(String description)
{
super("", 0);
this.description = description;
}
}