Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Replies
    16
    Views
    6,119

    [SOLVED] Re: [Help] Java Project: Electricity Bill

    You need to repeat the code you posted in #11 above for the Commerical.
    pseudo code:
    if (residential) {
    code from post #11
    }else if (commerical){
    code from post #11 modified for Commerical...
  2. Replies
    16
    Views
    6,119

    [SOLVED] Re: [Help] Java Project: Electricity Bill

    Use an if statement.
  3. Replies
    16
    Views
    6,119

    [SOLVED] Re: [Help] Java Project: Electricity Bill

    If you have two sets of rates then you need logic for each rate. You have posted the logic for the Residential.
    Now you need logic for the Commerical.

    If the two rate schedules have the same...
  4. Replies
    16
    Views
    6,119

    [SOLVED] Re: [Help] Java Project: Electricity Bill

    Can you copy the relevant parts into your program so it can be seen as part of your posting on this thread?
  5. Replies
    16
    Views
    6,119

    [SOLVED] Re: [Help] Java Project: Electricity Bill

    What does the variable: Service contain?
  6. Replies
    16
    Views
    6,119

    [SOLVED] Re: [Help] Java Project: Electricity Bill

    Define a variable and assign it the value:
    final int ResRate = 123.4;
    final int ComRate = 234.5;

    Then use the variable in the formula to compute the bill.
  7. Replies
    16
    Views
    6,119

    [SOLVED] Re: [Help] Java Project: Electricity Bill

    I don't know how your program determines what the user has chosen.
    You will need to get and save that information so you can use it later to determine what equation to use to compute the bill.
  8. Replies
    16
    Views
    6,119

    [SOLVED] Re: [Help] Java Project: Electricity Bill

    Use an if statement with the condition specifying the range of values. Something like:
    if(x > 3 && x < 10) { ...

    Your chained if /else if statements should also work.

    Print out the value of...
Results 1 to 8 of 8