Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question
Invoicing.java

Create a class named Invoicing (no instance private data fields) that includes
three overloaded computeInvoice() methods and one displayDetails() method for
a book store:

see pages 140 and 183 for examples...

* Define a constant for the 8% tax rate at the top of the Invoicing class.
Set the TAXRATE double constant to 0.08. Do not set to a whole number.
When computeInvoice() receives a single parameter, it represents the price
of one book ordered. Calculate the tax using the TAXRATE constant. Add the tax
to the price and save the total due in a variable. Call the displayDetails()
method, defined in the computeInvoice() class, being sure to pass the total due
as an argument to the display method.

* When computeInvoice() receives two parameters, they represent the price of
a book and the quantity ordered. Multiply the price times quantity, calculate the
tax using the TAXRATE constant, and calculate the total due. Call the
displayDetails() method, defined in the computeInvoice() class, being sure to
pass the total due as an argument to the display method.

* When computeInvoice() receives three parameters, they represent the price
of a book, the quantity ordered, and a coupon value. Multiply the quantity and
price, reduce the result by the coupon value. Then calculate the tax using the
TAXRATE constant and calculate the total due. Call the displayDetails()
method, defined in the computeInvoice() class, being sure to pass the total due
as an argument to the display method.

* The displayDetails() method receives the total as a parameter and prints the
total.



TestInvoice.java
Create an application/driver program named TestInvoice with a main() method
that tests all three overloaded methods using the following data (do not
instantiate any objects):

Price 24ドル.95
Price 17ドル.50, quantity 4
Price 10ドル.00, quantity 6, coupon 20ドル.00
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
    Recommended textbooks for you
    Text book image
    Database System Concepts
    Computer Science
    ISBN:9780078022159
    Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
    Publisher:McGraw-Hill Education
    Text book image
    Starting Out with Python (4th Edition)
    Computer Science
    ISBN:9780134444321
    Author:Tony Gaddis
    Publisher:PEARSON
    Text book image
    Digital Fundamentals (11th Edition)
    Computer Science
    ISBN:9780132737968
    Author:Thomas L. Floyd
    Publisher:PEARSON
    Text book image
    C How to Program (8th Edition)
    Computer Science
    ISBN:9780133976892
    Author:Paul J. Deitel, Harvey Deitel
    Publisher:PEARSON
    Text book image
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781337627900
    Author:Carlos Coronel, Steven Morris
    Publisher:Cengage Learning
    Text book image
    Programmable Logic Controllers
    Computer Science
    ISBN:9780073373843
    Author:Frank D. Petruzella
    Publisher:McGraw-Hill Education