Week 3: Introduction to Objects
What is Object Oriented Programming?
The
Car
Class
Constructing objects with
new
The Member Access Separator
.
Using a
Car
object in a different class
Member Variables vs. Local Variables
Methods
Invoking Methods
Implied
this
Passing Arguments to Methods
Passing Arguments to Methods, an Example
Returning Values From Methods
Returning Multiple Values From Methods
Constructors
Using constructors
Access Protection
Examples of Access Protection
The Four Levels of Access Protection
The Three Benefits of Access Protection
Further Examples of Classes
Week 3 Exercises
Start
|
Top
Last Modified October 15, 1999
Copyright 1997-1999 Elliotte Rusty Harold
elharo@metalab.unc.edu