Java, Java, Java
5. Objects: Using, Creating, and Defining
OBJECTIVES
After studying this chapter, you will
Be familiar with using variables to store and manipulate simple data.
Be familiar with creating and using objects.
Understand the relationship between classes and objects.
Understand the difference between objects and data of primitive type.
Understand the difference between static and and instance elements of a class.
Be able to understand and design a simple class in Java.
Understand some of the basic principles of object-oriented programming.
OUTLINE
Introduction
Using String Objects
Drawing Shapes with the Graphics Object (Optional)
Class Definition
Case Study: Simulating a Two-Person Game
From the Java Library: java.util.Scanner Special Topic: Alan Kay and the Smalltalk Language Chapter Summary
Solutions to Self-Study Exercises Exercises
61