Home     |     Java    |     Php General    |     Oracle Database    |     Oracle Server  

MS Dynamics CRM 3.0

  •  Setting up and Configuring Microsoft Dynamics CRM 3.0
  •  Managing Security and Information Access
  •  Entity Customization: Concepts and Attributes
  •  Entity Customization: Forms and Views
  •  Entity Customization: Relationships, Custom Entities, and Site Map
  •  Reporting and Analysis
  •  Workflow
  •  Server-Side SDK
  •  Client-Side SDK
  •  Integration with External Applications
  • Cervo Technologies
    The Right Source to Outsource

    Sharepoint Portal Server KB

    Microsoft CRM Info

    WPF Interview Questions

    SilverLight Interview Qs

    Asp.Net 2.0 Interview Qs

    Asp.NET 1.1 FAQs

    Oracle Interview Questions

    SAP Interview Questions

    Java Programming

    Sorry, 1 qns to ask


    Gas Used                              Rate
     First 100 cubic meters  $5.00 minimum cost
     Next 200 cubic meters   4 cents per cubic meters
     Next 200 cubic meters   2 cents per cubic meters
     Above 500 cubic meters  1 cent per cubic meters

    I need to create a java to calculate this ^
    i only know for the first 100 cm
    (gas <= 100)
             {cost = 5.00;
             }

    but i dont know how to do the next steps..
    can u just show me the next step to calculate the "next 200cm" and i
    will try to continue on myself.
    Thanks in advance.!!

    On 14 May 2007 06:37:26 -0700, JeffJak wrote:

    > but i dont know how to do the next steps.. can u just show me the
    > next step to calculate the "next 200cm" and i will try to continue
    > on myself.

    Here's a hint: start at the other end! Check first for >500, calculate
    the price for the part that exceeds 500, then subtract those and move
    *down* to the next level.

    /gordon

    --

    On May 14, 9:43 pm, Gordon Beaton <n@for.email> wrote:

    > On 14 May 2007 06:37:26 -0700, JeffJak wrote:

    > > but i dont know how to do the next steps.. can u just show me the
    > > next step to calculate the "next 200cm" and i will try to continue
    > > on myself.

    > Here's a hint: start at the other end! Check first for >500, calculate
    > the price for the part that exceeds 500, then subtract those and move
    > *down* to the next level.

    > /gordon

    > --

    so i need to declare a few variations?? eg, ans 1 = ans2 - 100
    cost = ans2 *0.05

    JeffJak wrote:
    > Gas Used                            Rate
    >  First 100 cubic meters        $5.00 minimum cost
    >  Next 200 cubic meters         4 cents per cubic meters
    >  Next 200 cubic meters         2 cents per cubic meters
    >  Above 500 cubic meters        1 cent per cubic meters

    > I need to create a java to calculate this ^
    > i only know for the first 100 cm
    > (gas <= 100)
    >          {cost = 5.00;
    >          }

    if (gas >= 100 and gas <= 200)
               {cost = 5.00 + (gas - 100) * 0.04;
               }

    and so on...
    (the formulas for the next gas ranges will get more and more complicated)

    > but i dont know how to do the next steps..
    > can u just show me the next step to calculate the "next 200cm" and i
    > will try to continue on myself.
    > Thanks in advance.!!

    --
    Thomas
    Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc