Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a new Java file called Photo BillingYourLastName with a public static void main. Create three overloaded computePhotoBill() methods for Shutterfly. When computePhotoBill() receives a

Create a new Java file called Photo BillingYourLastName with a public static void main.

Create three overloaded computePhotoBill() methods for Shutterfly.

When computePhotoBill() receives a single double parameter, it represents the price of one photo book ordered. Add 6% tax and return the total due as a double.

When computePhotoBill() received two parameters, they represent the price of a photo book and the quantity ordered (int). Multiply the two values, add 6% tax and return the total due.

Finally, when computePhotoBill() receives three parameters, they represents the price of a photo book, the quantity ordered, and a coupon value. Multiple the quantity and price for a new subtotal, compute the coupon discount by multiplying the coupon value by subtotal, the reduce the subtotal by the calculated coupon value. Finally, add 6% tax and return the total due.

In the main method, call each method testing to make sure you receive the correct values and back. For example, with these calls (using printf to two decimals), I would receive the following:

computePhotoBill(19.99); // 21.19

computePhotoBill(19.99, 2); // 42.38

computePhotoBill (19.99, 2, .1); // 38.14

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

9. Power and politics can be destructive forces in organizations.

Answered: 1 week ago