Tags:class
    • 05Jul
      Analyzing class invariants
      Posted By Brain Concert

      Analyzing class invariants

      In object-oriented programming, a class invariant is a condition upon which one can rely to be true during the execution of the program, condition that is applied to all objects of the class. Objects are an assembly of data and behavior, and an…

    • 26Jun
      Introducing Interface Segregation Principle
      Posted By Brain Concert

      Introducing Interface Segregation Principle

      Interface Segregation Principle (ISP) is the fourth principle in S.O.L.I.D. set of principles (hence the letter I) and it deals with how business logic is communicated to the client. In object-oriented world, business logic is implemented in…

    • 14Jun
      Introducing Dependency Inversion Principle
      Posted By Brain Concert

      Introducing Dependency Inversion Principle

      The last principle from the S.O.L.I.D. set of principles (at least in the order of the acronyms) is Dependency Inversion Principle (hence the letter D). It relates to the way dependencies between modules can make the design of a module rigid,…

    • 30May
      Liskov Substitution Principle
      Posted By Brain Concert

      Liskov Substitution Principle

      The implementation looks ok. Birds usually eat and fly. In the distinctive case of an Ostrich we do not have the flying capability so an exception is thrown. However, the exception is unexpected for the code inside main merthod, so the program…

    • 23May
      Open-Closed Principle
      Posted By Brain Concert

      Open-Closed Principle

      Software applications are changing during both development and maintenance phases. New functionalities are usually added but also changes to existing functionalities are implemented. When this happens, what is important is to minimize the amount…