{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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 don’t 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

{[ snackBarMessage ]}

Ask a homework question - tutors are online