I'm trying to add wombats into my program for a final project for a computer science class. What I'm trying to do is at a specified time add womabts into the world. My code is shown below, when I try to compile the code it says that by the a and b is an " ')' is expected is there something I'm not doing right or go about doing this a different way? I tried a while loop as well but that also did not work.
/**
* This method is for adding wombats into the world
*/
public void addWombat()
{
if (time < 231)
{
int a = Greenfoot.getRandomNumber(500);
int b = Greenfoot.getRandomNumber(400);
Wombat wombat = new Wombat();
addObject(new Wombat() a, b);
}
}