Thank you for your answer. The example is fictional, but i suppose each program would have different data structures, so the conversion you mentioned is logical.
Type: Posts; User: jbraque
Thank you for your answer. The example is fictional, but i suppose each program would have different data structures, so the conversion you mentioned is logical.
Hello,
Suppose there is an API with a class that calculates the area of an arbitrary polygon.
The API is going to be used from several programs. But every program has different objects to store...
Ok never mind, thanks
I have to catch multiple exceptions and find which exception was thrown without using a if...else block. The exceptions are written by me and their number so far is 10 and may expand in the future.
...
Well yes you are right about the pseudocode...
Anyway i thought of putting all strategies in a collection and perform all of them as they will have the same interface.
Hello all,
This is an example of pseudocode:
if string = "" then
do something
if string case is all capital
do something else
if ...
do something else
Oh yes you are right, i will try it. Thanks!
Hello everyone,
I've implemented a strategy pattern for reading an XML file in two (for now) cases. In the next image i show what differs and what is the same in both strategies.
2491
Well the...
Hello people,
Let's say i have an object with some fields. How can i create a class objectList that can calculate the statistics of the these objects?
For example i have object.fieldname and i want...