Answer:
- import java.util.Scanner;
-
- public class Main {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- System.out.print("Input total sales of month: ");
- double totalSales = input.nextDouble();
-
- double stateTax = totalSales * 0.04;
- double countyTax = totalSales * 0.02;
- double totalSalesTax = stateTax + countyTax;
-
- System.out.println("County Tax: $" + countyTax);
- System.out.println("State Tax: $" + stateTax);
- System.out.println("Total Sales Tax: $" + totalSalesTax);
- }
- }
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).
Answer:
Hi!
The following Javascript statement compares if num is 2 or 5 and increment num by 1 if true.
if ( num==2 || num==5)
num = num +1;
Explanation:
The operator == is used to compare if the operands are equal.
The operator || is OR.
- If at least one of the operands is true then return true.
- If all operands are false returns false.
if( num==2 || num==5)
<em> // if num is equal 2 or if num is equal 5</em>
num = num +1; <em>// adds 1 to num.</em>
Answer:
A web browser, or simply "browser," is an application used to access and view websites.
Answer:
Patent violation.
Explanation:
Patent can be defined as the exclusive or sole right granted to an inventor by a sovereign authority such as a government, which enables him or her to manufacture, use, or sell an invention for a specific period of time.
Generally, patents are used on innovation for products that are manufactured through the application of various technologies.
Basically, the three (3) main ways to protect an intellectual property is to employ the use of trademarks, copyright and patents.
In this scenario, a programmer hacks software code to understand how it works. Then she writes a program that replicates the implementation of a solution that has already been granted intellectual property protection.
Hence, this is an example of a patent violation because she was not given the permission or rights by the intellectual property owner to modify the software.
Answer:
ExpressRoute
Explanation: ExpressRoute is an Azure service that allows a user to create a private connection with other datacenters /infrastructures. It gives an enterprise the opportunities to effectively extend and expand its networks into cloud services offered by Microsoft cloud, it can also be described as a cloud Integration option that can be used by a private network to plug-in into a Microsoft cloud services.