Create one string that has results from all three methods


This is my Java/NetBeans assignment. I am going to try to work it out on my own, but if my code doesn't work, I'd like to have the correct code to reference:

  • Only use the default file for your code - do not create a new class!
  • Add a constant value for the tax rate - 8%
  • In the 'main' method file add the following:
    • Using the JOptionPane Class, ask the user for the cost on an item.
      • Use this answer for the rest of the program 
      • Do not create three JOptionPanes, only one for user input and one for output.
    • Convert the users answer to a double number.
    • Create one string that has results from all three methods (method requirements are below)
    • Create one JOptionPane to display the results. For example - if the user enters 35.25, the output could look like this:
  • Create three overloaded methods each with the name ComputeBill that will do the following:
    • First overloaded method - Calculate the cost including tax
      • Pass the cost of the item
      • Calculate the taxes on the item based on the tax rate.
      • Return thecost including tax
    • Second overloaded method - Calculate the cost including tax for 4 items
      • Pass the cost of the item and the number of that item sold
      • You do not have to ask the user for this number, just pass 4 for the quantity.
      • Calculate the taxes on the items based on the tax rate.
      • Return thecost including tax for 4 items
    • Third overloaded method - Calculate the cost including tax for 4 items with a $20 coupon
      • Pass the cost of the item, the number of that item sold, and the the coupon value.
      • You do not have to ask the user for this number, just pass 20.00 for the coupon value.
      • The coupon amount is removed from the cost BEFORE you calculate the tax.
      • Calculate the taxes on the items based on the tax rate.
      • Return thecost including tax for 4 items with a $20 coupon.

Solution Preview :

Prepared by a verified Expert
Business Economics: Create one string that has results from all three methods
Reference No:- TGS02222783

Now Priced at $30 (50% Discount)

Recommended (91%)

Rated (4.3/5)