Chapter 5 HFOOAD

--Originally published at Hackerman's house

This chapter talks about the importance of making software that is flexible that is prepared for change.

The abstract class defines behavior, and the subclasses implement that behavior

The first topic is the abstraction. We can use abstract classes as a mold for objects that share the same behavior, this is later implemented in the subclass following the precise requirements for that class, taking as a base the behavior of the abstract class. The subclass can implement or override what’s in the abstract class. The first step to create an abstract class is determining when objects share the same behavior.

By coding to an interface your code will work with all of the interface’s subclasses-even ones that haven’t been created yet

The interfaces have been a common topic since I began studying this career, the classes inherit common behavior from this interface, interfaces make software easier to extend, this is important as it adds flexibility to the software.

In this chapter I noticed that I usually see encapsulation just as a way to avoid repeated code but it is more than that, encapsulation can prevent unnecesary changes in the classes. A good practice is to separate behaviors of an app that can change a lot from those behaviors that won’t.

Finally one of the things that impacted me the most in this chapter was that you have to analyze your own code and recognize when you have made a mistake, design is iterative and you have to change your own design in case it’s needed.

Warmup

Photo by Mr. Nixter

Finally I want to talk a little about my project. We have decided our project and it’s main requirements but we need to define better what the reach of the project is going to be, the design until now is very Continue reading "Chapter 5 HFOOAD"