I didn't find any question that would be this general.
Please post whatever you find to be a useful rule for oject-oriented design.
I didn't find any question that would be this general.
Please post whatever you find to be a useful rule for oject-oriented design.
There are many, many OOD practices (Google it!) if you had to pick over others I would go with SOLID an acronym for;
I have recommended the Head First Design Patterns book many times.
It gives you a good intro to the GoF Design Patterns (a more advanced book that you also should read), but also a good intro to sound OOP design principles.
Few other principles are
I suggest you to look into "Head first - OOAD" as well..
Good summary of OOD principles can be found here: http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
The author is Robert C. Martin (also known as Uncle Bob), programming specialist with more than 40 years of experience in programming.
Articles are taken from his book "Clean Code" which IMHO is a really good material for OOP design principles.
Read other people's code and try to design class diagrams.
It will give you an idea of how other people think through problem solving.
That helps me a lot. Especially frameworks.
The best of OOP nothing, any approach that's fit for your project is best. But it is important what are OOP practices before choosing any/many from them for your project.
1: APIE: Abstraction, Polymorphism, Inheritance, Encapsulation.
2: SOLID Principle.
3: OO analysis and design.
4: Design patterns.
5: Code refactoring.
6: Effective Java.
In my view,I think if you want to learn about Object Oriented design you should try to play with Smalltalk language since it is the language which started Object Oriented programming.
We have an alternative now called Squeak which is open source.SOLID as out fellow mate mentioned also gives you a great idea about OOPS.
All the best on your OOPS journey.
You can check out Squeak on Squeak on Web.