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
Which statement describes one drive?
Ipatiy [6.2K]
One drive is microsofts storage service for holding files in the “cloud”. It offers users a simple way to store and sync various types of files with other people/devices on the internet.
6 0
3 years ago
Se numeşte permutare a unei mulţimi finite orice rearanjare a tuturor elementelor acelei mulţimi.
nydimaria [60]
Um......English please
8 0
3 years ago
An online service provider provides its users with hosted computers, an operating system, and a database management system (DBMS
RoseWind [281]

Answer:

The correct option is B: platform as a service (PaaS)

Explanation:

Platform as a service (PaaS) is regarded as a computing model in the cloud and ensures delivery of both software and hardware tools via a third-party provider. Tools delivered are mostly those that are needed for the development of application and are mostly delivers via the internet to its users. Software and hardware tools are usually hosted in the infrastructure of the PaaS provider host and thus this removes the burden on developers of having to install a physical software or hardware in the development or running of a new application.

7 0
2 years ago
Which term refers to a type of an attack in which an attacker makes his data look like it is coming from a different source addr
Andrew [12]

<u>Man-in-the-middle attack</u> refers to a type of an attack in which an attacker makes his data look like it is coming from a different source address, and is able to intercept information transferred between two computers.

<u>Explanation:</u>

A man-in-the-middle attack (MITM) is an assault where the aggressor furtively transfers and potentially changes the correspondences between two gatherings who accept that they are straightforwardly speaking with one another. This happens when the assailant catches a segment of a correspondence between two gatherings and retransmits it sometime in the future. The assailant would then be able to screen and perhaps change the substance of messages. The utilization of such encoded burrows makes extra secure layers when you get to your organization's secret systems over connections like Wi-Fi.

8 0
2 years ago
What are 5 good movies like The Breakfast Club or 8 Mile?
Gnoma [55]

Answer:

The Notebook, Beauty and the Beast, Step Brother, The Breakfast Club and The Little Mermaid

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • This was not a "true" operating system, but rather an operating environment.
    5·1 answer
  • // This pseudocode is intended to display // employee net pay values. All employees have a standard // $45 deduction from their
    12·1 answer
  • A user reports that she can't access the new server used in the accounting department. you check the problem and find out that h
    9·1 answer
  • Which statement about the Paste Link option is true? A)Even if the source file (spreadsheet) is deleted, the data updates automa
    11·1 answer
  • Access Control can be defined as putting controls (or countermeasures) in place to help achieve information security goals. Whic
    13·2 answers
  • What is the output of the second println statement in the main method? public class Foo { int i; static int s; public static voi
    14·1 answer
  • What is an example of CT SO?
    9·1 answer
  • What is the most vulnerable information that should be protected to prevent unauthorized access to your online files and records
    8·1 answer
  • Which properties would be useful to know to search for a Word document? Check all that apply.
    7·1 answer
  • 1.a computer can create an output based on the input of the user.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!