The object-oriented programming emphasizes objects, which consist of data and operations on the data. For example, we may have a figures like circle or line object with the operation of drawing the figures. If c is a circle object, we invoke its draw method (operation) by passing a message to c:
While the traditional programming typically call a function like
where CIR is a flag to indicate which figure to draw.