Chapter 4
Writing Classes (p.190)

Chapter Objectives

. Define classes that act like blue-prints for new objects, made of variables and methods.
. Explain encapsulation and Java modifiers.
. Explore the details of method declarations.
. Review method invocation and parameter passing.
. Explain and use method overloading.
. Learn to divide complicated methods into simpler, supporting methods.
. Describe relationships between objects.
. Create graphics based objects.
Day 1 -
Objects and classes
PowerPoint
Coin.java
CountFlips.java

FlipRace.java

HW
Reading: Pgs 190-196

Day 2 - 11/29
Anatomy of a method
PowerPoint

Banking.java
Account.java

HW read pages 206-214 do 4.6 on page 241
SnakeEyes.java
Die.java

Day 3 12/1
Method decomposition
PowerPoint

PigLatin.java
PigLatinTranslator.java

HW read pages 214-219
Run PigLatin and explain how the program demonstrates method decomposition. ( 1 paragraph. explain what StringTokenizer is.)

Day 4 12/13

HW Due 12/15

Students are to start reading pages 219 to end of chapter. Run StudentBody.java add a few students.

Run LineUp.java on page 233

Day 5.. 11/15
Place holder
PowerPoint

read page
.

HW
Day 6.
Place holder
PowerPoint

read page
.

HW

Day 7
Place holder
PowerPoint

read page
.

HW

TEST

Day 8
Place holder
PowerPoint

read page
.

HW

Write a method called alarm that prints the string "Alarm!" multiple times on separate lines. The method should accept an integer parameter that specifies how many times the string is printed. Print an error message if the parameter is less than 1.