ADT Name: Drawable
draw(drawing);
/*
Draw self ("this" drawable object) onto the passed parameter "drawing". No return value.
*/
drawAllOn(drawables, drawing) { for (let nextDrawable in drawables) { nextDrawable.draw(this); } }
ADT Name: Pair first(); /* Return the first element in the pair (an object). */ last(); /* Return the last element in the pair (an object). */
let pair = getPairExample() let first = pair.first() let last = pair.last() //Send messages to first and last as desired