Think of five "classes" (object types). Description
Think of:
Nouns
Things
Tips
Circle
Airplane Hints
Ellipse
Line
Tree
Road
Company
etc. Solution
Example #2
Given a class (object type) called Student.
Think of five possible instances (objects) of class/type Student. Description
For simplicity let's just use first name to describe these Student objects. Tips
Kofi
Bob
etc. Hints
Five student objects:
Kofi
Bob
Yaping
Ama
Wang Solution
Example #2
We may define a Lake to have a name, location, depth and size. Three examples of Lakes are: "Lake Superior", "Parker's Lake", "Medicine Lake".
Which are the class(es) and which are the object(s) ? Description
Classes are definitions.
Objects are instances or real occurrences. Tips
There is just one class in this example. Hints
Lake is the object class (or type).
And we have three objects (instances) of class Lake:
Lake Superior
Parker's Lake
Medicine Lake
Solution
Example #3
Think of a blank college application. The application is like a class. It has been designed with blank fields to capture information. For this example, assume the original blank college application sits in the admissions office. How would we use the application? Description
List the steps that an admissions person might take. Tips
Think of a scenario where the admissions person drives to a nearby high school for an admissions event. Hints
These may be the steps:
Make 20 copies of the original college application.
We now have 20 copies ready for use (initially blank).
Set up a table in the high school cafe and ask students to fill out the application.
Return from the even with 20 filled-out applications.
The original is like a class.
The 20 copies are like constructing 20 objects (instances) from the class.
The 20 filled-out applications are like 20 functional objects.
Solution
Introduction To Objects With Java
(Chapter 301 - Object Types and Objects)