this means: hide the specifity of processing inside of overriden methods of subclasses (instead of explicit conditions check)


In pseudo-language:


Replace code like


       if obj.isOfType1 then doSomethForType1(obj)

       else if obj.isOfType2 then doSomethForType2(obj)

       ...


By the call

       obj.doSomething()


And create different implementations of doSomething() in particular subclasses of base class.


Thursday, July 15, 2010, 5:23:32 PM, you wrote:


>

Hi,

   I am developing one basic application for banking, a company gave me this task. The requirements is as follows: 



There are 3 data holders:

- owner

- accounts

- transactions to process


There are some tasks like finding account owners and others. 


The company requires polymorphism instead of boolean fields? I am confused about this statement. Anybody help me to explain this statement and how can i design the classes on the basis of this. Waiting for your quick reply.


Arslan



-- 

You received this message because you are subscribed to the Google

Groups "Java EE (J2EE) Programming with Passion!" group.

To post to this group, send email to

java-ee-j2ee-programming-with-passion@googlegroups.com

To unsubscribe from this group, send email to

java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com

For more options, visit this group at

http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en 





-- 

Best regards,

 Aleksei                            mailto:aleksey.mesh...@tut.by

--
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to