0

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;
}
}

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by jasimp
0

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.)

0

[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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.