I can create a turtle that will be in a window with the following code:
Turtle t1 = new Turtle(w,100,100);
If I want to know its coordinates, I
Use turtle.xcor() it returns the x position. Use turtle.ycor() it returns the y position.
turtle.xcor()
turtle.ycor()