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]
2 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]2 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
The postorder and preorder traversal of a binary tree are given below - postorder : D E B F G C A preorder : A B D E C F G respe
jeka57 [31]

Answer: The answer is A

Explanation:

in  the attachment

6 0
3 years ago
This provides an easy method for workers to use their computers.
eduard
The correct answer for this question would be letter choice C) GUI or the third option.
7 0
3 years ago
Technology, by itself is neither good nor bad.<br> A) true<br> B) false
sukhopar [10]

Answer:

true

Explanation:

I'm pretty sure it's true. I took coding class and something similar came up, but not 100% sure tho

8 0
2 years ago
Read 2 more answers
Can someone urgently help me with my java code? Ive been working on it for hours and its not working.
ki77a [65]

Answer:

hi

Explanation:

3 0
2 years ago
Does anyone know the answer to this question??
Ket [755]
The type of letter they are looking for is an Inquiry Letter. 
An Inquiry letter asks questions or elicits info from the recipient. They would include what they are looking for or what they need to know about. They should include any info to reach back to them. 
6 0
3 years ago
Other questions:
  • you are a software engineering consultant and have been called in by the vice president of finance of a corporation that manufac
    10·1 answer
  • Nila has created a report, and now she would like to a create table of contents. Nila has reviewed her report and decides to add
    9·1 answer
  • To define constructors and member functions outside of a class's original scope, the operator can be used.
    11·1 answer
  • What field would you use to store a value from another table?
    11·1 answer
  • When you write a C# program that stores a value in a variable, you are using temporary storage; the value you store is lost when
    12·1 answer
  • What is a mortgage?
    8·2 answers
  • Speech about society being normal
    12·1 answer
  • Number are stored and transmitted inside a computer in the form of​
    6·1 answer
  • An organization is conducting a study to see if hazardous waste sites pose health risks for cancer or other conditions, such as
    12·1 answer
  • What are common considerations businesses need to make before purchasing new computers? Check all of the boxes that apply.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!