20090916-ObjectsInJava

20090916-ObjectsInJava - CSE115: Introduction to Computer...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall NEW 645-4739 NEW alphonce@buffalo.edu 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Agenda Cell phones off & name signs out Review Questions? Objects The birds-and-the-bees talk Communicating with objects
Background image of page 2
Review Software development is an iterative and incremental process. OO software systems are systems of interacting objects. Objects have properties: things objects know (think of the counting object last class) behaviors: things objects do • (think of the “jumping jack” object)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
How do we create objects? new example1.Terrarium() There are three parts to this expression: new example1.Terrarium ()
Background image of page 4
Let‟s try it! • We use a tool called Eclipse… • …and a plug -in for Eclipse called DrJava DrJava provides an interactions pane
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Eclipse tour terminology view: a subwindow in Eclipse perspective: a collection of views Eclipse: a framework for building tools Eclipse is extended via plug-ins a plug-in: Java Development Tools (JDT) – others: DrJava, Green, CDT, …
Background image of page 6
Expression evaluation evaluating new example1.Terrarium() causes an object to be created and initialized produces a value
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
(part of) memory 107 108 109 110 111 112 113 114 115
Background image of page 8
evaluating a „new‟ expression used available available available available available available available used 107 108 109 110 111 112 113 114 115 When evaluating an expression like ‘new example1.Terrarium()’, the operator ‘new’ first determines the size of the object to be created (let us say it is four byte for the sake of this example)
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 23

20090916-ObjectsInJava - CSE115: Introduction to Computer...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online