composition example

In previous post we have seen an example of aggregation. Here we will deal with another association type i.e. composition. The article will provide a daily life simple composition example to understand the concept better Composition Example Two classes have…

aggregation example

We know about the association relationship in java, but there are forms of association. we all have read about aggregation relationship and composition relationship in java. This article will deal with aggregation example. Aggregation┬áExample: By definition we know that two…

Liskov Substitution Principle

Continuing our series about design principles, we will look into another important design principle and understand using violation of liskov substitution principle. Liskov Substitution Principle: Liskov Substitution Principle states that Subtypes must be substitutable for their base classes. At first…