Search:

Type: Posts; User: jbraque

Search: Search took 0.09 seconds.

  1. Replies
    3
    Views
    1,448

    Re: Managing different types of input

    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.
  2. Replies
    3
    Views
    1,448

    Managing different types of input

    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...
  3. Replies
    6
    Views
    1,135

    Re: Refactoring if statement

    Ok never mind, thanks
  4. Replies
    6
    Views
    1,135

    Re: Refactoring if statement

    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.
    ...
  5. Replies
    6
    Views
    1,135

    Re: Refactoring if statement

    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.
  6. Replies
    6
    Views
    1,135

    Refactoring if statement

    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
  7. Replies
    2
    Views
    1,531

    Re: Strategy Pattern and code duplication

    Oh yes you are right, i will try it. Thanks!
  8. Replies
    2
    Views
    1,531

    Strategy Pattern and code duplication

    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...
  9. Replies
    1
    Views
    1,597

    Min/Max of fields

    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...
Results 1 to 9 of 9