Objects and Data Structures – The Law of Demeter

How much information about one object should another object have? Should an object be able to access the inner objects of another one? The law of Demeter Simply put, the Law of Demeter says that an object shouldn’t have knowledge of the inner workings of another object. A method in an object should only have…

Continue reading

Objects and Data Structures – Data Abstraction

Object Oriented Programming (OOP) is a programming paradigm in which we use real world concepts or objects and create abstractions that will represent them in our software. Data Abstraction When we create an abstraction to represent a real world concept or object, we have to decide what that abstraction will expose and what it will hide (private…

Continue reading