Last post May 05, 2014 06:44 AM by akfkmupiwu
May 01, 2014 06:33 AM|newphone8|LINK
I am not pro in design patterns and need help to understand which pattern shall i use for the below scenario.
I have create a model design to maintain list of courses. Each course will have courseid, coursename, coursedescription etc (attributes). The courses can be of different types CourseTypeA, CourseTypeB (each course having same attributes as mentioned above).
I need to be able to build a list of each course types and pass it to the program using these classes.
I have read using interfaces are the preferred way in designing classes, but i am confused how to go about it. Please suggest. A sample will really help.
May 01, 2014 08:00 AM|vikash702|LINK
You may use facade design pattern...
May 01, 2014 09:17 AM|newphone8|LINK
Sorry, i am not aware of this pattern! Can you please share some reasons why facade pattern? And provide some example.
May 02, 2014 02:39 AM|BetsyASP|LINK
Provide a unified interface to a set of interfaces in a subsystem. Façade defines a higher-level interface that makes the subsystem easier to use.
May 02, 2014 03:02 AM|vikash702|LINK
May 04, 2014 12:17 AM|optimizedcodermojam|LINK
I think you have to learn more about patterns for practical usage. In that case you can read following book. This is a great book for learning Design patterns and principles. Hope it will help you to solve your any design pattern related problems.
May 05, 2014 06:44 AM|akfkmupiwu|LINK
Each course will have courseid, coursename, coursedescription etc (attributes). The courses can be of different types CourseTypeA, CourseTypeB etc; Can you please elaborate your problem in more details.
Need to understand if CourseType can also be an attribute? In this case one interface ICourseClass and one class implementation can do the job, list of ICourseClasses can be used as transporter. You need to go for design pattern if based on CourseType
each courseClass is going to have different implementation.