declaring problems with enums
The following was asked of me and having a little problem with declaring enums in another class. The enum is set up correctly as I have used them before for GUI but doesnt seem to work when needing to call from it
* A Route has a destination and a type. The type of the route can be
* : local,airport or depot (set in enum class)
public class Route
private String destination;
private RouteType rType;
/** creates a route given its destination as a String and its type
* @param d represents the destination as a String
* @param t represents type; clients should use the public static fields available in this class
public Route(String d, RouteType t)
destination = d;
rType = t;
as it says in the comments it needs to be public static fields for type but i cant get it working.
Hope its clear enough!