{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lec09 - Lecture 9 Objects and classes Constructing objects...

Info icon This preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CS125 Course Notes Lecture 9, Slide 1 Lecture 9 • Objects and classes • Constructing objects • Instance variables • Methods (Savitch 4.1)
Image of page 1

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

View Full Document Right Arrow Icon
CS125 Course Notes Lecture 9, Slide 2 Object A Java program consists of interacting objects. • An object models a thing (real or abstract). It has values (attributes) and operations (methods). • A class in Java is the code which details how to create (instantiate) an object of the class and includes the set of associated operations. A “template.” An object is an instance of a class
Image of page 2