the code for an elevator simulation refuses to compile and i cant see the problem, pls tell me the problem and how to correct it, thanks...

here are the codes:

package com.kooljoycie.elevator.event;
import com.kooljoycie.elevator.model.*;

public class ElevatorModelEvent {

// Location where ElevatorModelEvent was generated
private Location location;

// source Object that generated ElevatorModelEvent
private Object source;

// ElevatorModelEvent constructor sets Location
public ElevatorModelEvent( Object source, Location location )
{
setSource( source );
setLocation( location );
}

// set ElevatorModelEvent Location
public void setLocation( Location eventLocation )
{
location = eventLocation;
}

// get ElevatorModelEvent Location
public Location getLocation()
{
return location;
}

// set ElevatorModelEvent source
private void setSource( Object eventSource )
{
source = eventSource;
}

// get ElevatorModelEvent source
public Object getSource()
{
return source;
}
}

The compiler messages might help. Just maybe. (Especially since 90% of the people here are not even going to look at the code without that even. And many of the others won't look because you didn't even bother to use code tags, so that the code woud actually look like code.)

[code=*language you are using*] [/code]

Those are code tags when you use them your code looks like this; if you had used them originally your code would have been formatted correctly.

package com.kooljoycie.elevator.event;
import com.kooljoycie.elevator.model.*;

public class ElevatorModelEvent {

// Location where ElevatorModelEvent was generated
private Location location;

// source Object that generated ElevatorModelEvent
private Object source;

// ElevatorModelEvent constructor sets Location
public ElevatorModelEvent( Object source, Location location )
{
setSource( source );
setLocation( location );
}

// set ElevatorModelEvent Location
public void setLocation( Location eventLocation )
{
location = eventLocation;
}

// get ElevatorModelEvent Location
public Location getLocation()
{
return location;
}

// set ElevatorModelEvent source
private void setSource( Object eventSource )
{
source = eventSource;
}

// get ElevatorModelEvent source
public Object getSource()
{
return source;
}
}
This article has been dead for over six months. Start a new discussion instead.