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
Software that people commonly use in the workplace to make their lives easier is called
Lorico [155]
Software that people commonly use in the workplace to make their lives easier is called system software.
4 0
3 years ago
See the file attached!​
Dimas [21]
  1. Mail Merge is a handy feature that incorporates data from both Microsoft Word and Microsoft Excel and allows you to create multiple documents at once, such as letters, saving you the time and effort of retyping the same letter over and over.
  2. The Mail Merge feature makes it easy to send the same letter to a large number of people.
  3. By using Mail Merge, we don't have to type each recipient's name separately in each letter.
  4. We need to proofread only the main document network database systems object- oriented database system Hierarchical database system.
6 0
2 years ago
What is the difference between a network intrusion detection system (NIDS) and a network intrusion prevention system (NIPS)?
alisha [4.7K]

Answer:

Detection vs Prevention

Explanation:

  • A Network Intrusion Detection System as the name suggests it "detects" the attackers / vulnerabilities existed in the network system / infrastructure.
  • A Network Intrusion Prevention Detection System as the name suggests it "prevents" the attackers from hacking the system. While a detection just detects the abnormalities where as a prevention system can prevent them.
  • The detection system detects the vulnerabilities, security threats and the attackers in the system through the web traffic analyzers and security analyzers.
  • The prevention system prevents the network from being compromised. It tries to regain the access if already compromised.
  • Both the NIDS and NIPS have to be coordinated for the full protection of the network.
8 0
3 years ago
Which of these benefits can be achieved whensoftware is restructured?
Ivenika [448]

Answer:

iv. all of the given options

Explanation:

This is the correct answer because this is what happens when software is restructured.

<em>PLEASE</em><em> </em><em>DO MARK</em><em> </em><em>ME AS</em><em> </em><em>BRAINLIEST</em><em> </em><em>IF</em><em> </em><em>MY ANSWER</em><em> </em><em>IS HELPFUL</em><em> </em><em>;</em><em>)</em><em> </em>

4 0
3 years ago
Write the following program in C++ to print:
Alenkinab [10]
1.
#include <iostream>#include <string>
using namespace std;
int main(){    string chars; // This is where we will put our @ signs and print them    for(int x=0;x < 5; x++){
        chars = chars + '@'; // This will concatenate an @ sign at the end of the variable        cout << chars << "\n";    }}

2.
#include <iostream>#include <string>
using namespace std;
int main(){    string name; // Our variable to store the name    cout << "What is your name? \n"; // Asks the user for their name    cin >> name;    cout << "\nWell, hello " << name << "!";}

3.
#include <iostream>#include <string>
using namespace std;
int main(){    int number; // Our variable    cout << "Enter a number\n"; // Asks for a number    cin >> number;    cout << "You entered " << number << "%!";}

4.
#include <iostream>#include <string>
using namespace std;
int main(){    int number; // Our variable    cout << "Enter a number\n";    cin >> number;
    int check = number % 2; // The modulo operator (the percent sign) gets the remainder of the quotient    if (check == 0) {        cout << number << " is even!"; // If the remainder is 0 then it prints out "x is even"    } else {        cout << number << " is odd!"; // If the remainder is not 0 then it prints out "x is odd"    }}

5.
#include <iostream>#include <string>
using namespace std;
int main(){    float r; // Our variable    cout << "Enter a radius\n";    cin >> r;    if (r < 0){        cout << "Lol. No."; // If the radius is less than zero print out that message    }    float circumference=2*3.14*r;    float area=r*r*3.14;    cout << "\n\n Circumference of circle: " << circumference;    cout << "\n Area of circle: " << area;}
4 0
3 years ago
Other questions:
  • Find the cell address of first column and last row some one pls answer :'(​
    9·1 answer
  • Brian wants to conduct an online search using a certain phrase he intends to use the word books that belong to the 1800's in his
    8·1 answer
  • The speed of sound depends on the material the sound is passing through. Below is the approximate speed of sound (in feet per se
    9·1 answer
  • In a bubble sort, you use a(n) ____ loop to make pair comparisons.
    5·1 answer
  • How to get the absolute value in coding begginners?
    13·2 answers
  • _____ can render data useless to unauthorized users who might have violated some of the database security layers.
    7·1 answer
  • Done through Block Py/ Python
    11·1 answer
  • Define the missing function. licenseNum is created as: (100000 * customID) licenseYear, where customID is a function parameter.
    12·1 answer
  • PLZZZZZZZZZZZZZZZ HELP ME OUT!!!!! I SICK AND TIRED OF PEOPLE SKIPING MYQUESTION WHICH IS DUE TODAY!!!!
    14·1 answer
  • How will understanding IT help me achieve my goals in life?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!