Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 578 Bytes

class-oriented-programming.md

File metadata and controls

17 lines (10 loc) · 578 Bytes

Class Oriented Programming Questions

What makes a good class?

Obvious naming

Allow consumer to inject dependencies -> more open for extending, could make unit testing easier, as it decreases mocking tool dependencies.

Only expose publicly what is needed.

make use of the built in getter/setter found in many languages.

Consider how the functionality be extended, without having to change the class.

A class should have as few responsibilities as possible.

If you were writing a tutorial "How to write a bad class", what would you write in there?

Your expectations