Hello, can someone help me?
I am programming a simple car simulator and want the user to put in the destination and depending on where the destination is I want a object (little flag) to appear on The map but I doesn’t appear,’.
( Destination is the class of the flag)
My code in stride:
Fields:
private String end =„“
Constructor:
public Map()
super (1200, 800, 1)
end = Greenfoot. ask( "What is your Destination?" )
if (end == "Hospital" )
var Destination destination = new Destination ( )
addObject (destination, 599, 465)