Search:

Type: Posts; User: javapenguin

Search: Search took 0.23 seconds.

  1. Re: cable company billing..need help with methods

    import java.util.*;
    import java.io.*;

    public class CableCompanyBilling
    {
    static Scanner console = new Scanner(System.in);

    //Named constants - residential customers
    static...
  2. Re: cable company billing..need help with methods

    Also, could you show your new code?

    As for always getting that value, it should change it you pass it a different value.

    For instance,

    businesscust(200, 200);

    shouldn't, at least not...
  3. Re: cable company billing..need help with methods

    put code here
  4. Re: cable company billing..need help with methods

    Also, I have no idea how long the account numbers are, but

    9000000000 may likely be invalid as ints go up to (2^32) - 1.

    It may be better to take the account number in as a String if the...
  5. Re: cable company billing..need help with methods

    Have formatted your code to make it more readable.
  6. Re: cable company billing..need help with methods

    Also,

    amountDue = businesscust(numberOfPremium, numberOfBasic);
  7. Re: cable company billing..need help with methods

    It appears that you're using both numberOfPremiimum.... and numberOfBasic ....

    You should probably pass 2 ints as parameters.

    public static double businesscust(int premium, int basic)
  8. Re: cable company billing..need help with methods

    Note, when you call residentcust, you have to have the parameter, though you don't need the data type again:

    so for public double residentcust(int anInt);

    you have residentcust(anInt);

    For...
  9. Re: cable company billing..need help with methods

    To pass a parameter, say an int, you do this:

    public doubt methodName(int anInt)
Results 1 to 9 of 10