Directions: a method calledactthat takes no parameters and returns nothing. This method shouldcheck to see if the ānā key has been pressed. If that key has been pressedandthere areno Lobstrosities in the world, then the scoreboard should bereset for a new game, a newLobstrosity should be added to the world in the center horizontally and between 40 and 240for a y-location, and a new player should be centered at the bottom of the world.
My code: public void act()
{
reduceStrength--;
if (Greenfoot.isKeyDown("N") && (Lobstrosity<=0))
{
addObject(new Lobstrosity(300,Greenfoot.getRandomNumber(240)+40));
setRotation(90);
addObject(new Player(310,368));
}
}
The error is when I added the Object. It says the constructor cannot be applied to given types. Anyone know how to fix this?

