lec14Feb408

lec14Feb408 - Visibility Modifiers Control access Reserved...

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

View Full Document Right Arrow Icon
Lecture 14 February 4, 2008
Background image of page 1

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

View Full DocumentRight Arrow Icon
Recap Class Object State Behavior QuickTime™ and a TIFF (Uncompressed) decompressor are needed to see this picture. Car.java QuickTime™ and a TIFF (Uncompressed) decompressor are needed to see this picture. Name: Astron Martin Type: DBS Price: $265000 Owner: Ladan Power: 530 hp Well defined operations associated with a car. e.g. changing the price, owner, etc
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

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

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

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

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

Unformatted text preview: Visibility Modifiers Control access Reserved words: public, private, . Instance variables should be declared private (Encapsulation) Need a way to access and modify data value--> get, set methods Direct access from outside the object May be used anywhere inside the class definition but not externally In class example...
View Full Document

This note was uploaded on 04/14/2008 for the course COMP 202 taught by Professor Verbrugge during the Winter '07 term at McGill.

Page1 / 11

lec14Feb408 - Visibility Modifiers Control access Reserved...

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

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