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
AnnZ [28]
3 years ago
15

in java A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and

county sales tax collected. The state sales tax rate is 4 percent and the county sales tax rate is 2 percent. Write a program that asks the user to enter the total sales for the month. The application should calculate and display the following: • The amount of county sales tax • The amount of state sales tax • The total sales tax (county plus state)
Computers and Technology
1 answer:
qaws [65]3 years ago
8 0

Answer:

  1. import java.util.Scanner;
  2. public class Main {
  3.    public static void main(String[] args) {
  4.        Scanner input = new Scanner(System.in);
  5.        System.out.print("Input total sales of month: ");
  6.        double totalSales = input.nextDouble();
  7.        double stateTax = totalSales * 0.04;
  8.        double countyTax = totalSales * 0.02;
  9.        double totalSalesTax = stateTax + countyTax;
  10.        System.out.println("County Tax: $" + countyTax);
  11.        System.out.println("State Tax: $" + stateTax);
  12.        System.out.println("Total Sales Tax: $" + totalSalesTax);
  13.    }
  14. }

Explanation:

Firstly, create a Scanner object and prompt user to input total sales of month (Line 5-7). Next, apply the appropriate tax rate to calculate the state tax, county tax (Line 9 - 10). Total up the state tax and county tax to get the total sales tax (Line 11).

At last, print the county tax, state tax and the total sales tax (Line 13 - 15).

You might be interested in
Need answer ASAP plz
Natalka [10]

Answer:

i can't read a single word on there i'll come back to it if you can zoom in a little

Explanation:

6 0
3 years ago
The file descriptor stderr is represented by the number ____.
enyata [817]
Stderr is 2. stdin is 0, stdout is 1.
5 0
3 years ago
Which consumer document is most likely to help you if you have trouble figuring out how to operate a device
kenny6666 [7]
The answe is 'B', as it should contain all the required information on how to operate the device, as well as a troubleshooting guide.
6 0
3 years ago
The process of bringing data or a file from one program to another is called
Digiron [165]
The answer is importing
8 0
2 years ago
Read 2 more answers
Give three reasons why you think Clip Art is so widely used in many different types of documents.
irinina [24]
Well Here Are Some Advantages To Clip Art,
There Is A Large Variety Of Clip Art To Choose From.
You Don't Need To Buy Any Special Equipment Like A Scanner.
It Takes No Artistic Skills To Produce.
Most Clip Art Is Royalty And Copyright Free.
It Doesn't Have To Be Developed From Scratch.
Hope I Helped
6 0
3 years ago
Read 2 more answers
Other questions:
  • QUESTION : John travels a lot and he needs to access his documents and services on the go. Which of these technologies allows hi
    15·1 answer
  • What type of interview would be most likely for the following scenario?
    11·2 answers
  • You have just connected a new computer to your network. The network user static IP addressing. You find that the computer can co
    12·2 answers
  • Select the characteristics that describe the evolution of computers that predate the personal computer (select all correct answe
    12·1 answer
  • A string with delimiters can be parsed into separate fields using the _____ class.
    8·1 answer
  • Prompts what is a row?
    7·1 answer
  • A period in which unemployment is low, business produces many goods and services, and wages are good is called ______.
    8·1 answer
  • Whats the difference between Input and Output? Give and example of an example on a M:B​
    15·1 answer
  • A friend wants to design an app but has never done so before and isn't sure how to begin. What would you suggest they do first?
    7·1 answer
  • By the mid-1990s, how did revenue generated from video games compare to revenue generated from movies?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!