Java programming

A method can be directly or indirectly recursive and we will explore the differences. Discuss how and why would you trace a recursive method.

  1. 👍 0
  2. 👎 0
  3. 👁 62
asked by Poohboi
  1. I am extremely confused as to how to proceed.

    Now create another class called WaterBill. Write a method called print() for this class that displays water bills. Your method takes three parameters: an integer account number, a character use code, and a double representing the gallons of water used. The output from your method should include the account number, message indicating the type of usage, and the amount of money due from the user.
    The water rates vary depending on the type of usage. A code of H means home use, a code of C means commercial use, and a code of I means industrial use. Any other code value should be treated as an error. Water rates are computed as follows:
    Code H: Code C:
    Code I:
    $5.00 plus $0.005 per gallon
    $1000.00 for the first 4 million gallons used plus
    $0.025 for each additional gallon used
    $1000.00 if usage does not exceed 4 million gallons
    $2000.00 is usage is between 4 million and 10 million gallons $3000.00 is 10 million gallons or more

    1. 👍 0
    2. 👎 0
    posted by Meg
  2. Shoot, I just realized this is a question. I'm dumb lmao sorry

    1. 👍 0
    2. 👎 0
    posted by Meg

Respond to this Question

First Name

Your Response

Similar Questions

  1. Finite Math

    Discuss the differences between the echelon method and the gauss-jordan method for solving matrix problems? What are the pros and cons of using a calculator or computer to do these calculations?

    asked by Jennifer on December 13, 2009
  2. help plz:)

    which statement does NOT describe how greek words entered english? a.they have been formed by combining greek elements. b.they have come indirectly by way of latin. c.they have come indirectly by way of german d.they have been

    asked by justin on April 14, 2010
  3. Econ MC

    When externalities are present in a market, the well-being of market participants a. are directly affected and market bystanders are indirectly affected. b. and market bystanders are both directly affected. c. and market

    asked by Anonymous on March 17, 2007
  4. Math

    What the heck is recursive? recursive: repeats Going up a stairwell is a recursion each step. knitting is a recursive process.

    asked by Kiddy i am on June 14, 2007
  5. Math-examples?

    Can anyone give an example of recursive method, explicit method using the variable n?

    asked by Helen on December 20, 2013
  6. Math-examples?

    Can anyone give an example of recursive method, explicit method using the variable n?

    asked by Helen on December 20, 2013
  7. chemistry

    Describe how you would weigh your KHP samples, if you didn’t know about weighing by differences. Mentioning any differences between your method and the method we made you use, explain why we use the technique of weighing by

    asked by priya on October 7, 2010
  8. Science

    What are some ways we directly and indirectly release carbon into the atmosphere?

    asked by Anonymous on May 19, 2014
  9. Financial

    I have found all the answers, but I have no idea how to compare my findings. Here are what I need to compare. 1) Rules of thumb: 2) Adjusted book value: 3) Discounted cash flow: All three of those have answers that I have already

    asked by Lindsay on July 25, 2010
  10. com 425

    Discuss the following cultural differences you have observed in your workplace and how these differences affected communication? Styles of dress Different uses of time, views of punctuality, etc.

    asked by meshelle on April 21, 2010

More Similar Questions