Does anybody know the structure of an array that could be used to handle a traffic light sequence?
Traffic light structure array
Collapse
X
-
Tags: None
-
shainarushton6,
What sort of information do you want in the sequence? Strings? Objects?
Unless you can give more information about what you want to accomplish, I don't think that we can help you beyond suggesting an array of objects, or a "Map", depending on what the index is.
Cheers!Code:String Colours[] = {"Red", Yellow", "Grun"}; Map<String, Object> Lampz = new Map<String, Object>(); Lampz.put("Red", "<object for Red here>"); Lampz.put("Yellow", "<object for Yellow here>"); Lampz.put("Grun", "<object for Grun here>");
Oralloy
Comment