Composition vs Aggregation

Kitchen in House is Composition and Engine in Car is Aggregation Composition: If internal attributes can not exist without Outer Class, that goes to Composition. You can not take Bedroom, Kitchen or Balcony out of any Flat or House. i.e public class CompositionExample{   public static void main(String[] args) { House house = new House(); … More Composition vs Aggregation