90 likes | 238 Views
Intro to Object-Oriented Programming. What happens when you go to Jack in the Box?. Is it the same person that makes all your food?. What can the FryerGuy do?. Classes (definition or blueprint for an object). The FryerGuy is a class He has attributes (something that describes him) name
E N D
Classes (definition or blueprint for an object) • The FryerGuy is a class • He has attributes (something that describes him) • name • He has methods (what the object can do) • makeFries • makeTacos • …
Objects (the actual instances) • Bob is a FryerGuy • He has attributes (something that describes him) • name -> Bob • He has behaviors (what the object can do) • makeFries • makeTacos • …
DrawingTool class • Sort the following into Attributes and Behaviors: • direction • drawCircle • forward • move • pencil is up or down? • turnLeft
DrawingTool class • Attributes • direction • Up or down? • Behaviors • drawCircle • forward • move • turnLeft
Library files Hi h; h=new Hi(); h.hello(); h.bye(); Hello World! Bye! Editor Interpreter Compiler Class files Java Bytecode Program Source Code Compiling and Running