Java Reference
In-Depth Information
9
Objectives
To describe objects and classes, and use classes to model objects (§9.2).
■
To use UML graphical notation to describe classes and objects (§9.2).
■
To demonstrate how to define classes and create objects (§9.3).
■
To create objects using constructors (§9.4).
■
To access objects via object reference variables (§9.5).
■
To define a reference variable using a reference type (§9.5.1).
■
To access an object's data and methods using the object member access
operator (
.
) (§9.5.2).
■
To define data fields of reference types and assign default values for an
object's data fields (§9.5.3).
■
To distinguish between object reference variables and primitive data
type variables (§9.5.4).
■
To use the Java library classes
Date
,
Random
, and
Point2D
(§9.6).
■
To distinguish between instance and static variables and methods (§9.7).
■
To define private data fields with appropriate getter and setter methods
(§9.8).
■
To encapsulate data fields to make classes easy to maintain (§9.9).
■
To develop methods with object arguments and differentiate between
primitive-type arguments and object-type arguments (§9.10).
■
To store and process objects in arrays (§9.11).
■
To create immutable objects from immutable classes to protect the
contents of objects (§9.12).
■
To determine the scope of variables in the context of a class (§9.13).
■
To use the keyword
this
to refer to the calling object itself (§9.14).
■
Search WWH ::
Custom Search