Not sure why interface and implementation is not working

Can you all take a look at my code and tell me where I am going wrong?

interface IBeacon {
// Determines whether beacon is within range of truck
Boolean isPresent();
// Determines how for beacon is from truck
int getDistance();

class Route implements IBeacon {
String name;
char line;
String route;
String station;
int distance;

Route(String name, char line, String route, String station, int distance) { = name;
this.line = line;
this.route = route;
this.station = station;
this.distance = distance;
public Boolean isPresent() {
if (this.distance<=10) {
return true;

int getDistance() {
return this.distance;

Is this Processing code?

When you post, please help us by formatting your code with the </> button or by putting ``` above and below your code block.

You might want to check out the implements reference page:

Yes this is processing code.

This is just an interface and a class. How are you using them in setup or draw? What error(s) are you getting?