Send Close Add comments: (status displays here)
Got it!  This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Classes and objects


1. Classes and objects

2. Classes and objects
An understanding of classes and objects is essential to understanding object-oriented concepts.

3. Objects
An instance is a specific occurrence of a general idea.

4. Classes
An object is an instance of a class.

5. Cars
An class is a template for how to make instances of objects.



6. Cookie cutters
A cookie-cutter template is used to create a cookie as an instance of an idea of a cookie.

7. Object properties
An object has specific properties, methods, and reacts to or creates events.

8. Properties
A property is an attribute of the object.

Personal property is something that belongs to a person.

9. Methods
A method is a way of doing something.


Some methods work better than other methods at accomplishing a given task.

A method is a means to have the object do something (i.e., do an operation).

10. Events
An event is something that happens.


An event is triggered when something special happens.

11. Mouse events
In most GUI (Graphical User Interface) architectures, when the mouse moves on the screen, an event is created whenever it enters or leaves a control object such as a link object, a image object, etc. The object receives the message that the mouse is entering, and may change the appearance property of the mouse cursor. Likewise, when the mouse leaves a control object, the object receives a message and can change the cursor back to what it was.

12. House analogy

13. The baby object

14. Baby events
A baby can create events such as the cry event, the poop event, the hunger event, etc. These events require handling from an outside source.

A baby can react to events from outside sources. Such events include the feel something event, the see something event, the hear something event, the eat something event, etc. (Often, the hunger event triggers the cry event which triggers the eat something event, which triggers the poop event).

15. Desktop
The desktop has properties: screen appearance

16. End of page

17. Multiple choice questions for this page

18. Acronyms and/or initialisms for this page