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
A computer connected to the Internet that asks for data is a(n) ________. Select one: A. server B. client C. aggregator D. surro
madreJ [45]

Answer:

client

Explanation:

The client makes a request for a service, and a server performs that service.

7 0
4 years ago
The _____ method randomly rearranges the items in the list provided in the parentheses.
yulyashka [42]
Shuffle is the answer
8 0
3 years ago
Read 2 more answers
"what is the common information listed under the ip section of pdu details as compared to the information listed under the osi m
frez [133]

Solution:

The common information listed under the ip section of pdu details as compared to the information listed under the osi model tab is Packet Tracer.

This simulation activity is intended to provide a foundation for understanding the TCP/IP protocol suite and the relationship to the OSI model. Simulation mode allows you to view the data contents being sent across the network at each layer. As data moves through the network, it is broken down into smaller pieces and identified so that the pieces can be put back together when they arrive at the destination. Each piece is assigned a specific name (protocol data unit [PDU]) and associated with a specific layer of the TCP/IP and OSI models. Packet Tracer simulation mode enables you to view each of the layers and the associated PDU. The following steps lead the user through the process of requesting a web page from a web server by using the web browser application available on a client PC.  Even though much of the information displayed will be discussed in more detail later, this is an opportunity to explore the functionality of Packet Tracer and be able to visualize the encapsulation process.

This is the required answer.

7 0
3 years ago
JAVA When simply determining the order of magnitude of an algorithm using Big-Oh algorithm analysis, an instruction that evaluat
OlgaM077 [116]

Answer:

True.

Explanation:

When determining the order of magnitude of an algorithm using the Big-Oh algorithm analysis.The instruction which evaluates to O(c) is equal to one that is O(1) because it is considered as constant time and to represent constant we use O(1) in  big-Oh notation.

Hence the answer to this question is True.

7 0
3 years ago
What is work immersion and its nature​
Kobotan [32]
Work Immersion refers to the subject of the Senior High School Curriculum, which involves hands-on experience or work simulation in which learners can apply their competencies and acquired knowledge relevant to their track.
3 0
3 years ago
Other questions:
  • Why does the hp computer not have Bluetooth?
    6·1 answer
  • Windows on the desktop are just one of many objects used in a graphical user interface (GUI)-- buttons, drop-down list boxes, po
    7·1 answer
  • The Internet raises the bargaining power of customers most effectively by: making information available to everyone. reducing ba
    15·1 answer
  • Buying the newest phone as soon as it is released when your current phone works perfectly is not a good idea for all but which o
    10·2 answers
  • Plz help me to learn python and thx
    7·1 answer
  • No spamming or links
    15·2 answers
  • How do you enter the decimal 73 into the computer?
    11·1 answer
  • Yeoo check dis out!!!!!! wait my full vid dont show hol on
    7·2 answers
  • Which approach to bandwidth usage consumes all of the available frequencies on a medium to transmit data
    7·1 answer
  • Which sql keyword is used to retrieve a minimum value from an attribute in a table
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!