ITSE 2317 OOP
The Essence of OOP using Java, Local Classes
Lesson # 1638
Run: Sat Aug 11 16:26:24 CDT 2012
Baldwin

Slides
aa  -  ITSE 2317 Java Programming (Intermediate)
ab  -  Class can include several items
ac  -  The Essence of OOP using Java, Local Classes
ad  -  Figures
ae  -  Listings
af  -  What is a local class?
ag  -  Defined in methods
ah  -  Defined in initializers
ai  -  Linked to object of enclosing class
aj  -  Containing object
ak  -  A true inner class
al  -  What about a local interface?
am  -  Why use local classes?
an  -  Improved readability
ao  -  The most important benefit
ap  -  Access to all members
aq  -  Eliminating constructor parameters
ar  -  Protected members
as  -  Can be particularly useful when ...
at  -  From a theoretical viewpoint
au  -  Anonymous classes
av  -  An analogy
aw  -  The scope of a local class
ax  -  Access to final local variables
ay  -  Similar to member classes
az  -  What separates the two?
ba  -  A big restriction
bb  -  Copies of local variables
bc  -  Copies are made
bd  -  Restrictions on local classes
be  -  All classes produce class files
bf  -  According to Nutshell
bg  -  A reference to the containing object
bh  -  A hidden argument
bi  -  A private reference
bj  -  Accessing private members
bk  -  Similar to your code
bl  -  The good news
bm  -  A sample program
bn  -  Fragments
bo  -  Five classes
bp  -  The class files
bq  -  Containment hierarchy and class file names
br  -  Not so clear for local classes
bs  -  Overall program structure and behavior
bt  -  Instantiate two objects of class B
bu  -  The showB method
bv  -  Containment
bw  -  Inheritance hierarchy
bx  -  B extends Y
by  -  No inheritance relationship
bz  -  Inheritance is independent of containment
ca  -  Inheritance relationship is possible
cb  -  The controlling class
cc  -  The baseTime static variable
cd  -  The main method
ce  -  Two objects of class B
cf  -  The top-level class named X
cg  -  A protected instance variable
ch  -  Also available via containment hierarchy
ci  -  The top-level class named Y
cj  -  A protected instance variable
ck  -  Overridden toString method
cl  -  Beginning of the top-level class named A
cm  -  A private instance variable
cn  -  Accessed by object of local class
co  -  Constructor displays the time
cp  -  The screen output
cq  -  The private showA method
cr  -  Direct access to private showA method
cs  -  The method named delay
ct  -  The purpose of delay
cu  -  Beginning of the method named meth
cv  -  Two objects of local class B
cw  -  Access to final local variables
cx  -  Blank final variables
cy  -  Set value of blank final variable
cz  -  Relative execution time
da  -  The screen output
db  -  Beginning of the local class named B
dc  -  Location is important
dd  -  The bTime variable
de  -  The constructor
df  -  Back to the method named meth
dg  -  Instantiate two objects of class B
dh  -  The screen output
di  -  Invoke showB on the first object
dj  -  Back to showB in class B
dk  -  Items that are displayed
dl  -  The screen output
dm  -  Invoke private method showA
dn  -  Invoke showA
do  -  The screen output
dp  -  What is displayed?
dq  -  Use of the keyword this
dr  -  Access the containing object
ds  -  The screen output
dt  -  Illustrate the inheritance hierarchy
du  -  Define overridden toString in class B
dv  -  The screen output
dw  -  Two objects of local class B
dx  -  Invoke showB method on second object
dy  -  The screen output
dz  -  Important considerations
ea  -  Summary
eb  -  Complete Program Listing
ec  -  The End

-end-