Hi i am educating myself oop principles. I would like to know if this is a correct example of Cardellis definition of parametric polymorphism. Please enlighten me.The example is in cfml\'s script base
Given the following Class and Service layer signatures: public class PersonActionRequest { PersonVO person
This is a bit of a c开发者_StackOverflowonvoluted question, hopefully I can make it clear. I am finding that this may not be possible, but am trying to see if anybody has a solution.
This code doesn\'t work, but hopefully you\'ll get what I\'m trying to achieve here.I\'ve got a Money class, which I\'ve taken from http://www.noticeablydifferent.com/CodeSamples/Money.aspx, and exten
Having a chain of \"instanceof\" operations is considered a \"code smell\".The standard answer is \"use polymorphism\".How would I do it in this case?
I\'m writing a data driven WPF client. The client will typically pull data from a WCF service, which queries a SQL db, but I\'d like the option to pull the data directly from SQL or other arbitrary da
I\'m trying to replace simple enums with type classes.. that is, one class derived from a base for each type.So for example instead of:
What i think about virtual class is, if a derived class has a public base, let\'s say, class base, then a pointer to derived can be assigned to a variable of type pointer to base without use of any ex
I\'d like to write a safe version of toEnum: safeToEnum :: (Enum t, Bounded t) => Int -> Maybe t
Im trying to make a universal parser using generic type parameters, but i can\'t grasp the concept 100%