Introduction to Java
February 27, 2008
Introduction to Java February 27, 2008 1 What is Alice? A - - PowerPoint PPT Presentation
Introduction to Java February 27, 2008 1 What is Alice? A programming environment 2 Tuesday, October 7, 2008 What is Alice? A programming language 3 What is Alice? A library of graphic objects 4 Tuesday, October 7, 2008 What is Alice?
February 27, 2008
2D Graphical shapes - circles, lines, ... User interface elements - buttons, sliders, ... Networking Image manipulation... Many, many things
Class Method
Parameter Instruction public class FallBreak extends FrameWindowController { public void onMousePress (Location point) { new Text ("Fall break is coming!", 40, 100, canvas); } public void onMouseRelease (Location point) { canvas.clear(); } }
Coordinates measure pixels, the smallest dot
(0,0) 100
100
(0,0) 100 100
public class FallBreak extends FrameWindowController { public void onMousePress (Location point) { new Text ("Fall break is coming!", 40, 100, canvas); } public void onMouseRelease (Location point) { canvas.clear(); } }
public class FallBreak extends FrameWindowController { public void onMousePress (Location point) { new Text ("Fall break is coming!", 40, 100, canvas); } public void onMouseRelease (Location point) { canvas.clear(); } }
Many similarities in programming concepts Alice - limited to creating animations Java - wide applicability Alice programming environment - menu, drag&drop eliminates syntax errors, but clumsy Java programming environment - less clumsy, but requires learning syntax