This preview shows page 1. Sign up to view the full content.
Unformatted text preview: In both constructors, the role and position of the worker are inputted as a parameter Modifier methods which allow Role modification of an ant Position modification of an ant Print method That displays the id, position, and role of an ant Main method In this method, create 5 ants using both constructors and then, using the print method, display each ants information to the user. Finally, ask the user for a new coordinate position, and move your favorite ant to that position and display its updated information. 1 Research by Deborah Gordon: http://www.ted.com/talks/view/id/145...
View Full Document
- Winter '07