Can anyone tell me if this is correct when creating classes in Java?
public abstract class Animal
{
public class Point
{
public int x,y;
}
public class Animal
{
protected Point loc;
protected String name;
protected Random rng;
String getName()
{return name;}
Point getLocation()
{return loc;}
void setStartLocation(Point p)
{
}
Animal( String name, Random rng )
{
this.name = name;
this.rng;
}
void move()
{
}
}
public class Cat extends Animal
{
}
Do I put anything under void setStartLocation and void move? This is for a game where a cat is chasing a mouse on a island(grid).
Another thing I am not sure of is how would I override the move method to randomly move north, south, east or west under the Cat class. Would it be something like move.random()?
Thank you for any help.