I have craeted a countdown timer for my world but when I compile I get an error message - no suitable constructor found - I'm unsure what this means. Can you help?
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class CountdownTimer here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class CountdownTimer extends TimeCounter
{
/**
* Act - do whatever the CountdownTimer wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
private int startTime;
private int endTime;
private int deltaTime;
private long sysTimeMark = System.currentTimeMillis();
private boolean enabled = true;
/**
* Constructor for objects of class Timer
*/
public CountdownTimer(String prefix, int startTime, int endTime)//main constructor
{
super(prefix);
this.startTime = startTime;
this.endTime = endTime;
deltaTime = ((endTime - startTime)<0)?-1:1;
setValue(startTime);
}
public CountdownTimer(String prefix, int secondsToCountDown)// constructor to countdown in seconds with a prefix
{
this(prefix, secondsToCountDown,true);
}
public CountdownTimer(int secondsToCountDown)//constructor to countdown in seconds with no prefix
{
this("",secondsToCountDown,true);
}
/**
* implements the call of actEachInterval()method at the end of each interval of time set in the field interval
*/
public void act()
{
if (enabled)
{
if((System.currentTimeMillis()- sysTimeMark)> 1000)
{
int newTime = getValue()+ deltaTime;
setValue(newTime);
if(newTime == endTime)
{
enabled = false;
actCountingEnd(); //call this method at the end of the counting
}
else
{
sysTimeMark = System.currentTimeMillis();
}
}
/**
* An example of a method - replace this comment with your own
* @param y a sample parameter for a method
* @return the sum of x and y
*/
}
}
public void stop()
{
enabled = false;
}
public void start()
{
enabled = true;
sysTimeMark = System.currentTimeMillis();
}
public void reset()
{
enabled = true;
setValue(startTime);
sysTimeMark = System.currentTimeMillis();
}
/**
* An example of a method - replace this comment with your own
* @param y a sample parameter for a method
* @return the sum of x and y
*/
public void actCountingEnd()
{
Greenfoot.setWorld(new GameOverTimeExpired());
Greenfoot.stop();
}
}

