Displaying orientation of C # object with BioInformatics

I am teaching C # to Bioinformatics students. I just started OOP Principles. I have to explain the terms over and over again because they feel boring as long as I use a technical term. Finally, I decided to communicate them in my own language (I mean an example from a Biological related term).

It's hard for me to combine the term class, object, event, delegates, attributes, polymorphism, inheritance, encapsulation, serialization, reflection, etc. with biological relationship. If some one starts to give an example of at least some terms, I can create the rest.

+2


source to share


1 answer


Examples like this may be contrived and do not allow for the full implications of OO programming. Students will be stuck with unrealistic types of polymorphism and inheritance based on Is-A canine mammals.

You can think of a class as a species, say, and an object as an organism, but then what are the static classes and static methods? Such metaphorical concepts must be discarded fairly quickly in their formation so as not to harm their use of a language that is much richer than metaphors in other areas of experience.



It is important to remember that while OO is useful for modeling the real world, it is also only an internal representation, and sometimes there are needs where the software implementation will not literally match 1-1 reality.

For example, the static factory methods Rabbit :: CreateRabbit are not at all connected to the real world of creating new rabbits, which is most likely more like an instance method acting only on a female rabbit with a male rabbit with a delegate callback that will fire after 28 days. If they get this joke, they are probably ready to end.

+8


source







All Articles