Object, Property, Method and Event


In object-oriented programming (OOP), there are some terms that need to be understood, as the term object, property, method and event. Here is the explanation:


Object: a component in the program.

Property: characteristics of the object, this column displays the properties of the components that are currently active.

Method: actions that can be performed by the object.

Examples of Method:
AddItem: To add an item
RemoveItem: For deleting an item at a particular index
Clear: To clear all items


Events: events that can be experienced by the object

For Mouse Event Example:
Click: press and release the left mouse button while the pointer above dengancepat control.
DoubleClick: press and release the left mouse button twice quickly.
MouseDown: press and hold the left mouse button
MouseUp: release the left mouse button
MouseMove: move the mouse without pressing buttons
Event for Keyboard
KeyPress: if a keyboard button is pressed.
KeyDown: when holding down a keyboard key.
KeyUp: when the user releases a keyboard key.

In addition to the above terms, there are several other terms, the Procedure. In programming we can break the commandments of procedures and programs in a particular function. This facilitates the programming because it is more structured, and there are procedures that can be used repeatedly, makes it easy to program maintenance, it is easier to identify the bug.

Comments