mercredi 24 décembre 2014

How do you know it is static or dynamic class?


In OOA&D I would like to know how you easily distinguish if a class is static or dynamic? I think static classes include some utility functions which in fact implement the approach of procedural languages. Then the main advantages of OOP should be dynamic classes which generate many objects. But for the one who is used to procedural programming how he can think of dynamic classes and the necessity for objects. Maybe they are the entities we store in database. I am familiar with these classes, also I know if I have many variables sharing common attributes I could use objects. objects also have state and are mutable.


I would like some rules of thumb to easily distinguish them in any project. sometimes we think for any thing we should have a dynamic class while that class could be static.





Aucun commentaire:

Enregistrer un commentaire