Search:

Type: Posts; User: Plural

Search: Search took 0.09 seconds.

  1. Replies
    26
    Views
    16,137

    Re: JAVA help on file: Internet Service Provider

    The brackets seem to pair up nicely...
    The last bracket, isn't it supposed to pair up with the one after "public static void"?


    package javaapplication11;
    import javax.swing.JOptionPane;
    /**
    ...
  2. Replies
    26
    Views
    16,137

    Re: JAVA help on file: Internet Service Provider

    if(packageLetter!='A' && packageLetter!='B' && packageLetter!='C')
    {
    JOptionPane.showMessageDialog(null, "Please enter either A,B, "
    + "or C).");
    }...
  3. Replies
    26
    Views
    16,137

    Re: JAVA help on file: Internet Service Provider

    I've fixed those.
    Now, whatever I enter...it becomes "Please enter either A, B, or C."


    package javaapplication11;
    import javax.swing.JOptionPane;
    /**
    *
    * @author Home
    */
  4. Replies
    26
    Views
    16,137

    Re: JAVA help on file: Internet Service Provider

    I've changed it but on the sides, it says identifier expected and I'm not too sure where to put the brackets for the "if-else if-else".


    package javaapplication11;
    import...
  5. Replies
    26
    Views
    16,137

    Re: JAVA help on file: Internet Service Provider

    After execution, the message dialog appears for:
    package A
    package B
    the default

    So...therefore, I have to use else if? When I did that the error on side says that it should be "else without...
  6. Replies
    26
    Views
    16,137

    Re: JAVA help on file: Internet Service Provider

    It works but now I want to change a bit instead of using the switch statement:

    I'm not too familiar with using if-else if-else statements.

    Here's the code source:

    package javaapplication11;...
  7. Replies
    26
    Views
    16,137

    Re: JAVA help on file: Internet Service Provider

    The brackets for the "if statement" makes the variable "additionalHoursFee" not initialized for the statement "totalFee = monthlyFee + additionalHoursFee;"
    Even when I tried it with another way, it...
  8. Replies
    26
    Views
    16,137

    Re: JAVA help on file: Internet Service Provider

    I've done the things that you've asked me to change.
    The problem is pretty similar to my question.
    How do I make the minimum monthly fee appear instead of it being less?
    e.g. package 'A': 10 hours...
  9. Replies
    26
    Views
    16,137

    Re: JAVA help on file: Internet Service Provider

    All the answers that is above 10 hours for 'A' and 20 hours for 'B' are correct expect the ones that are under 10 hours for 'A' and under 20 hours for 'B' are incorrect.
    For 'A':
    I can enter any...
  10. Replies
    26
    Views
    16,137

    Re: JAVA help on file: Internet Service Provider

    Yes, the program works.
    As you can see, the program is suppose to compute the fee for the current month's internet service.

    For the first question from my code:
    It asks me to input the letter of...
  11. Replies
    26
    Views
    16,137

    Re: JAVA help on file: Internet Service Provider

    To the first question:
    I want to change the answer that would show in the message dialog as a 2 decimal value instead of the 16 decimal value.

    To the second question:
    Yes, I've debugged it. It...
  12. Replies
    26
    Views
    16,137

    Re: JAVA help on file: Internet Service Provider

    What I meant was that I am able to get the value for the computations but not the minimum value:
    for example, for case 'A' I enter 4 hours and I will get $-2.050000000000007 instead of $9.95.
    In...
  13. Replies
    26
    Views
    16,137

    JAVA help on file: Internet Service Provider

    What to do with this JAVA code?
    This is the code that I need to do:
    An Internet service provider has three different subscription packages for its customers:
    Package A: For $9.95 per month 10...
Results 1 to 13 of 13