Interfaces - Functions in Alice -difference from methods o...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Interfaces - why use them o they let you plug in different classes if they all implement the interface o must include all methods defined in interface - objects in interfaces o can be passed to a method that requires an object of that interface type object must be from a class implementing that interface or must inherit from a class that implements that interface
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Functions in Alice -difference from methods o dont change state of existing objects in the world o only return a value -built-in functions o check conditions while world is running ie: object width -how it works o receives values, performs computation, returns a value...
View Full Document

This note was uploaded on 02/28/2011 for the course CSCI 053 taught by Professor Sibert during the Fall '10 term at GWU.

Ask a homework question - tutors are online