As we have so many design patterns in java, like wise do we have any in c++.Or can we use the same sort of patterns in c++.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The original book on Design patterns (Design Patterns: Elements of Reusable Object-Oriented Software by the Gang of Four) predates Java. The examples in there are in C++ and Smalltalk.
Design patterns are applicable to many object-oriented programming languages; maybe it’s just that in Java they are usually so ubiquitous that you need them to solve anything non-trivial.
However, some design patterns are solved by language features (you don’t need to explicitly implement an Observer Pattern in C#, for example). Others aren’t even applicable to Java, as they need multiple class inheritance.