1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ksenya-84 [330]
2 years ago
6

Create a program with three overloaded computeBill() methods for a photo book store.

Computers and Technology
1 answer:
xeze [42]2 years ago
6 0

Using computational language in JAVA it is possible to write a code that deals with the fees applied in a total when buying a photobook.

<h3>Writing this code in JAVA we have:</h3>

<em>public class Billing {</em>

<em>    final static double TAX = 0.08;</em>

<em>    public static void main(String[] args) {</em>

<em>        final double HIGHPRICE = 24.99;</em>

<em>        final double MEDPRICE = 17.50;</em>

<em>        final double LOPRICE = 10.00;</em>

<em>        final int QUAN1 = 4;</em>

<em>        final int QUAN2 = 6;</em>

<em>        double bill;</em>

<em>        bill = computeBill(HIGHPRICE);</em>

<em>        System.out.println("The total for a photobook that costs $" +</em>

<em>                HIGHPRICE + " is $" + bill);</em>

<em>        bill = computeBill(MEDPRICE, QUAN1);</em>

<em>        System.out.println("The total for " + QUAN1 +</em>

<em>                " photobooks that cost $" +</em>

<em>                MEDPRICE + " is $" + bill);</em>

<em>        bill = computeBill(LOPRICE, QUAN2, 20.00);</em>

<em>        System.out.println("The total for " + QUAN2 +</em>

<em>                " photobooks that cost $" +</em>

<em>                LOPRICE + " with a $20 coupon is $" + bill);</em>

<em>    }</em>

<em>    public static double computeBill(double amt) {</em>

<em>        return amt * (1 + TAX);</em>

<em>    }</em>

<em>    public static double computeBill(double amt, int quantity) {</em>

<em>        return amt * quantity * (1 + TAX);</em>

<em>    }</em>

<em>    public static double computeBill(double amt, int quantity, double coupon) {</em>

<em>        return (amt * quantity - coupon) * (1 + TAX);</em>

<em>    }</em>

<em>}</em>

See more about JAVA at brainly.com/question/12975450

#SPJ1

You might be interested in
Write an application that allows a user to enter the names and birth dates of up to 10 friends. Continue to prompt the user for
mylen [45]
Sorry I don’t know the answer I am really sorry
5 0
3 years ago
The ________ view in access looks similar to an excel spreadsheet.
ch4aika [34]
Datasheet 
<span>The datasheet view in access looks similar to an excel spreadsheet.</span>
6 0
3 years ago
Will technology be the destruction or salvation of human-kind
Delicious77 [7]

MARK ME As BRAINLIEST

Answer is salvation
5 0
3 years ago
Read 2 more answers
Define the method object inc_num_kids() for PersonInfo. inc_num_kids increments the member data num_kids.Sample output for the g
topjm [15]

Answer:

class PersonInfo:

   def __init__(self):

       self.num_kids = 0

   def inc_num_kids(self):

       self.num_kids += 1

person1 = PersonInfo()

print('Kids:', person1.num_kids)

person1.inc_num_kids()

print('New baby, kids now:', person1.num_kids)

Explanation:

Line 1 of the code, we define the class PersonInfo. Line 3 of the code is the function that will increment the member data num_kids.

4 0
3 years ago
In this exercise, first run the code as it is given to see the intended output. Then trace through each of the 3 variables to se
dlinn [17]

Answer:

The memory with variable names str1, str2, and str3 all have equal and the same value after the first if-statement.

Explanation:

The str1 was first assigned a null value while the str2 and str3 were assigned the string value "Karen" with the String class and directly respectively. On the first if-statement, the condition checks if the str1 is null and assigns the value of the variable str2 to str1, then the other conditional statement compares the values of all the string variables.

3 0
3 years ago
Other questions:
  • Which of the following is true of property?
    13·1 answer
  • Create a style rule for the page body that sets the width to 95% of the browser window ranging from 640 pixels up to 960 pixels.
    11·1 answer
  • Which of the following takes place during the research phase
    7·1 answer
  • "the master boot record (mbr) method of partitioning hard drives is limited to what maximum size of drives
    13·1 answer
  • The ash and dust from a volcanic eruption can cause a ______ change in the environment.
    8·1 answer
  • How to cancel branly subscription??​
    8·1 answer
  • Please anyone, help me.... I'm not sure how to put these all together.<br> 35 points!
    15·2 answers
  • Answered
    10·1 answer
  • you are setting up an active directory environment for a business that has three locations and 300 users. you want the users to
    8·1 answer
  • What is the function of tab?<br>​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!