Classes, Objects, and World-level Methods. Alice. Larger Programs. As you become more skilled in writing programs, you will find that programs quickly increase to many, many lines of code. Games and other "real world" software applications can have thousands, even millions of lines of code. .
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Classes, Objects, and World-level Methods
Class: Frog (Uppercase name)
Objects: frog, frog1, frog2, frog3
In the FirstEncounter world, we wrote program code where a robot was surprised by an alien.
All the program code was written in this one method, see next slide…
Do in order
surprise – spiderRobot and alienOnWheels surprise each other
investigate – spiderRobot gets a closer look at alienOnWheels
react – alienOnWheels hides and spiderRobot sends message
Do in order
alienOnWheels moves up
alienOnWheels says "Slithy toves?"
spiderRobot's head turns around
“The alien moves up and says ‘Slithy toves?’ and then the robot's head turns around. "