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
Dominik [7]
4 years ago
15

Create a class named Billing that includes three overloaded computeBill() methods for a photo book store. When computeBill() rec

eives a single parameter, it represents the price of one photo book ordered. Add 8% tax, and return the total due. When computeBill() receives two parameters, they represent the price of a photo book and the quantity ordered. Multiply the two values, add 8% tax, and return the total due. When computeBill() receives three parameters, they represent the price of a photo book, the quantity ordered, and a coupon value. Multiply the quantity and price, reduce the result by the coupon value, and then add 8% tax and return the total due. Write a main() method that tests all three overloaded methods. Save the application as Billing.java.
Computers and Technology
1 answer:
dolphi86 [110]4 years ago
3 0

Answer:

Following are the program in the Java Programming Language.

//define class

public class Billing

{

//define method  

public static double computeBill(double Price)  

{

//declare variable and initialize the rate method

double taxes = 0.08*Price;

//print the output  

return Price+taxes;

}

//override the following function

public static double computeBill(double Price, int quant) {

//declare double type variable

double taxes = 0.08*(Price*quant);

//return the output

return (quant*Price)+taxes;

}

//override the function

public static double computeBill(double Price, int quant,double value) {

//declare double type variable

double taxes = 0.08*(Price*quant);

//return the output

return ((quant*Price)+taxes)-value;

}

//define main method

public static void main(String args[]) {

//call the following function with argument

System.out.println(computeBill(10));

System.out.println(computeBill(10, 2));

System.out.println(computeBill(10, 20, 50));

}

}

<u>Output</u>:

10.8

21.6

166.0

Explanation:

<u>Following are the description of the program</u>.

  • Define class 'Billing', inside the class we override the following function.
  • Define function 'computeBill()', inside it we calculate tax.
  • Then, override the following function 'computeBill()' and pass the double data type argument 'Price' and integer type 'quant' then, calculate tax.
  • Again, override that function 'computeBill()' and pass the double type arguments 'Price', 'value' and integer type 'quant' then, calculate tax.
  • Finally, define the main method and call the following functions with arguments.
You might be interested in
True or false? LearnSmart (the "smart flash card assignments") really gets your competitive spirit in gear by allowing you to se
vfiekz [6]
<h2>Answer:</h2>

The following statement is TRUE.

LearnSmart (the "smart flash card assignments") really gets your competitive spirit in gear by allowing you to see where you stand as compared to your classmates in terms of your mastery of grammar and vocabulary concepts.

<h2>Explanation:</h2>

LearnSmart is an adaptive technology that is helping a lot of students by letting them judge which parts/topics of the book are not clearly learnt by them and which of them are under their grip.

LearnSmart provides cards with short term questions that make i possible for students to complete their preparation in short time. In addition to this smart flash card assignments are a to compare students preparation relatively.

<h3>I hope it will help you!</h3>
4 0
3 years ago
What is referred to by the phrase “Web 2.0”?
Tresset [83]

Answer:

Web 2.0

the second stage of development of the World Wide Web, characterized especially by the change from static web pages to dynamic or user-generated content and the growth of social media.

Explanation:

It refers to websites that emphasizes user-generated content, ease of use,  compatible with other products, systems, and devices for end users.

4 0
3 years ago
Which type of evidence should victims collect to help officials catch cyber bullies
iren [92.7K]

Answer:

How you get cyberbullied just look away from the screen -Tyler The Creator

Explanation:

3 0
4 years ago
Read 2 more answers
What is the best web browser to use?
tiny-mole [99]
That would depend on what you would like to get out of your experience with the web broswer. Google chrome offers more efficient computational algorhythms, a quicker navigation of the UI, but loses privacy due to the connected google services which can report your data usage if not properly configured.Browsers like firefox offer extension capability (the same as google chrome) and is open sourced, but may be slower to navigate depending on user to user experience.Other browsers i would avoid unless they are: TOR (which is still just a heavily modified and secured version of firefox).
6 0
3 years ago
Read 2 more answers
You are a solutions engineer working for a large communications company that is migrating its existing server estate to AWS. You
erik [133]

Answer:

4 subnets

Explanation:

According to the specifications provided, it seems that you would need a total of 4 subnets for the entire server structure. This is because each web server needs 1 public subnet and each database needs one private subnet. If there are a total of 2 web servers and 2 database servers then each one will ultimately have 2 subnets meaning a total of 4 subnets. These would be 2 public subnets and 2 private subnets for the different availability zones, which would allow the server structure to maintain high availability.

4 0
3 years ago
Other questions:
  • As of 2012, Twitter has approximately how many members?
    10·1 answer
  • Andy designed a web page for a product-oriented industry using CSS properties. He used several HTML tags to create the web page.
    6·1 answer
  • The means of identifying an opportunity, understanding resource requirements, acquiring resources, planning, implementing, and h
    13·1 answer
  • Helping people keep track on things is the purpose of_____ A database B table C query D form​
    12·1 answer
  • Grace Hopper led the development of ______, a programming language for business applications.
    6·2 answers
  • if you play creative destruction and if u have a mic and if u play it 24/7 and would like to form a team tell me your name or yo
    7·1 answer
  • The private field, which is known as the property‘s __________, holds any data that is assigned to the property.a. private datab.
    9·1 answer
  • Matlab In this assignment you will write a function that will calculate parallel resistance for up to 10 parallel resistors. Cal
    15·1 answer
  • As long as you have great skills and references, you don't have to worry about how well you package that information.
    5·1 answer
  • 1. Answer the following questions: a. What are the different types of number system? Name them.​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!