RU beehive logo ITEC dept promo banner
ITEC 109
2014spring
ibarland

homeinfolectslabsexamshws
D2Lbreeze (snow day)tutor/PIs

lab-turtles-cont
Turtles
functions calling functions

We will continue our work with turtles from last time. Review / Re-explore the menu JES > Turtles: What function creates the world? WHat function creates a Turtle? What info do you need to pass in to each function?

to teacher:

Common bug: Sometimes in threeSmileys, just one of them is mysteriously missing its eyes!?! This is because penUp and penDown have been called from several different functions and not restored.

(It's a casualty of using void methods and side-effects: our turtle has state that we're not specifying; perhaps every method should return a Trtl structure, and unit-tests could test that all fields of the returned Trtl were the expected result.)

homeinfolectslabsexamshws
D2Lbreeze (snow day)tutor/PIs


©2014, Ian Barland, Radford University
Last modified 2014.Feb.24 (Mon)
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Powered by PLT Scheme