6 posts




Indicate that a class owns but may share objects of another class. Its representation is by an empty diamond, a straight line, the aggregation name and the attribute shared. An example is "Person ?---- Address".


It work similar as Aggregation but in a stronger way. Its representation is by a filled diamond, a straight line, the aggregation name and the attribute shared. An example is "Person -----? Name".


It is also called Inheritance. Used to describe a class that is a type of another class. Its representation is by an empty triangle and a straight line. An example is "Mammal -----? Dog".

Representing Abstract Classes in UML

An abstract class is a class that is extend by other classes. Unlike concrete classes, abstract classes can't be instantiated and only have methods. The main purpose of it is to have common code to use in subclasses. Its notation is similar as the Class but without attributes and the text is in italics.

Representing Interfaces in UML

An interface is a collection of operations that do not have corresponding implementation methods. Are much safer to use because they avoid the problems related to multiple inheritance. Think of it llike a contract.

In UML, an interface is drawn by a two sections rectangle. The top section includes the name of the interface with a guillemet (]]-->

Why do we need to program?

Technology is part of our life. The world is changing daily and everything is getting automated. Learn to program is the creative way we can take our ideas to the next level and express solutions to society. By designing programs, we learn several abilities like critical reading, analytical thinking and create synthesis. The programmer defines the problem, plans a solution, codes the program, test the proposal and documents the features. But we can't program all the solutions with the same method, that's why programming paradigms appears.

Overview of Programming Paradigms

According to Vasappanavara, a programming paradigm "it is the manner in which programming elements such as functions, objects and variables are exploited to produce the desired output". It is important to understand that programming paradigms are not programming languages.

The following are typical examples of programming paradigms (according to Bhave):

What is Object-oriented Programming (OOP)?

The object-oriented is a programming paradigm where the program logic and data are weaved. As stated by Phil Ballard, it is a way of conceptualizing a program's data into discrete "things" referred to as objects, each having its own properties and methods.

Let's see an example. Suppose your friend is a bank manager and he wants you to help improving their system. The first object you might design is the general-purpose


. The


object has properties and methods. For each client your friend's bank have, you would have to create an




As follows the most important features of object-oriented programming:

  • Encapsulation. Capability to hide data and instructions inside an object.
  • Inheritance. Ability to create one object from another.
  • Polymorphism. The design of new classes is based on a single class.
  • Message Passing. It is the way objects communicate with each other.
  • Garbage Collection. Automatic memory management that destroys objects that are no longer in use by the program.


As follows some benefits of using object-oriented programming:

  • Re-usability. You can write a program using a previous developed code.
  • Code Sharing. You are able to standardize the way your are programming with your colleagues.
  • Rapid Modeling. You can prototype the classes and their interaction through a diagram.


As follows the disadvantages of using object-oriented programming:

  • Size. Are larger than other programs, consuming more memory and disk space.
  • Effort. Require a lot of work to create, including the diagramming on the planning phase and the coding on the execution phase.

Basic Concepts

Basic template that specifies the properties and behaviours of something (real life or abstract).

Particular instance of a class that responds consequently to events.

Characteristics of the class. Often called instance variables.

Algorithm associate to an class that represent a thing that the object does.

Class based on another class.

Process where the subclass gets the attributes and methods from its parent class.

Specific template that enforces certain attributes and methods of a class.

Namespace that organizes a set of related classes and interfaces.

Alert the application when there is a state change of the object.


  1. Vasappanavara, R. Object-oriented Programming Using C++ and Java. Chapter 1. Object-oriented Programming Basics. Section 1.3. Programming Paradigms. Pearson Education. India. May, 2011.
  2. Bhave, M. Object Oriented Programming with C++, Second Edition. Chapter 4. Object Orientation: An Introduction. Section 4.1. Programming Paradigms. Pearson Education. India. May, 2012.
  3. Ballard, P. Sams Teach Yourself JavaScript in 24 Hours, Fifth Edition. Hour 7. What is Object Oriented Programming (OOP)?. Pearson Education, Inc. United States. November, 2012.

Filter Blog

By date: