class textGfx { string signature = "textGfx"; string color = "black"; to setColor(string color) {self.color = color;} to getColor() into string color {color = self.color;} to box(int x, int y, int width, int height) { print(color + " " + "box(" + x + " " + y + " " + width + " " + height + ")"); } to circle(int x,y, double radius) { print(color + " " + "circle(" + x + " " + y + " " + radius + ")"); } morph to specialShape(int x,y) {print("special text at " + x + " " + y);} } class fontGfx extends textGfx { string font = "times"; to getFont() into string font {font = self.font;} to setFont(string font) {self.font = font;} morph to specialShape(int x,y) {print("special font at " + x + " " + y);} } interface boxFace { to setColor(string color); to getColor() into string color; to box(int x, int y, int width, int height); to specialShape(int x,y); } interface circleFace extends boxFace { to circle(int x,y, double radius); } to redCircle(circleFace screen, int x,y, double radius) { screen.setColor("red"); screen.circle(x,y,radius); } to blueCircle(textGfx screen, int x,y, double radius) { screen.setColor("blue"); screen.circle(x,y,radius); } fontGfx gfx = (); gfx.box(10,20, 100, 200); gfx.setColor("orange"); gfx.box(15,25,90,190); redCircle(gfx, 3, 3, 2.5); circleFace iGfx = gfx; redCircle(iGfx, 6, 6, 2.5); blueCircle(gfx, 9,9,2.55); gfx.specialShape(0,1); iGfx.specialShape(1,2); class userInterface { circleFace screen; int mousePort; string keyUrl; } userInterface ui = (gfx, 8, "http://keyStuff.com"); ui.screen.circle(10,20,30); /*-soon soon-*/ /*- -*/