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
Maslowich
2 years ago
8

The below program uses an array salaryBase to hold the cutoffs for each salary level and a parallel array taxBase that has the c

orresponding tax rate. Run the program and enter annual salaries of 40000 and 60000, then enter 0. Modify the program to use two parallel arrays named annualSalaries and taxesToPay, each with 10 elements. Array annualSalaries holds up to 10 annual salaries entered; array taxesToPay holds up to 10 corresponding amounts of taxes to pay for those annual salaries. Print the total annual salaries and taxes to pay after all input has been processed. Run the program again with the same annual salary numbers as above. Challenge: Modify the program from the previous step to use a 2-dimensional array of 10 elements named salariesAndTaxes instead of two one-dimensional parallel arrays. The 2D array's first column will hold the salaries, the second the taxes to pay for each salary. "java"
Computers and Technology
1 answer:
marissa [1.9K]2 years ago
5 0

Answer:

Check the explanation

Explanation:

1. After running the program for annual salary 40000 and 50000 and then enter 0

a) For annual salaries of 40000

taxRate will be . 20

taxToPay will be 40000 x .20 = 8000

b)For annual salaries of 50000

taxRate will be . 30

taxToPay will be 50000 x .30 = 15000

2. Modify the program to use two parallel arrays named annualSalaries and taxesToPay

a) For implementing array of anuualSalaries that take input from user, refer following given code:

Scanner s=new Scanner(System.in);

   System.out.println("enter number of anuualSalaries");

   int n=s.nextInt();

   int anuualSalaries[]=new int[n];

   System.out.println("enter anuualSalaries");

   for(int i=0;i<n;i++){//for reading array

       anuualSalaries[i]=s.nextInt();

b) For implementing array of taxestoPay refer following code

int taxestoPay[] = new int[anuualSalaries.length];

       for (int i = 0; i < taxestoPay.length; i++) {

           taxestoPay[i] = "enter the result value of tax to pay"

       }

4. For two dimensional array of salariesAndTaxes refer following given code

int[][] salariesAndTaxes = new int[2][];

salariesAndTaxes[0] = new int[10];

salariesAndTaxes[1] = new int[10];

You might be interested in
You have just received a generic-looking email that is addressed as coming from the administrator of your company. The email say
natta225 [31]

Answer:

Delete and block the email. It is obviously a scam.

Add-on:

I hope this helped you at all.

6 0
2 years ago
Given an array declared to hold 100 values, the smallest index that can be used with the array is
Aneli [31]
In C influenced languages - 0.
8 0
3 years ago
Good business ethics is a good marketing strategy. Discuss
Arada [10]
Good business ethics are the key to good marketing and success. Ethics portray whether an individual has good judgment, intelligence, and many more things that are essential to business. Without good ethics business as a whole would be ruthless. Some business ethics are even required by the law in some places and there are rules and regulation to trade. 

Hope that answered your question!
6 0
3 years ago
Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and a
pshichka [43]
Int   k=0.total=0;
while(k++<50)
    total+=k*k;
    

5 0
3 years ago
Type the correct answer in the box. Spell all words correctly. What type of network is the Internet? The Internet is an example
denis23 [38]

Answer:

The answer is WAN (Wide Area Network).

Explanation:

  • The Internet is an example of WAN. It stands for wide area network. It is an information network that commonly links to computers that cover a broad specific area. In a WAN, two towns, states, or countries are linked.  
  • The main purpose of using WAN includes a wide range, offers unified information, get upgraded files and software, several email sharing applications, etc.
6 0
3 years ago
Other questions:
  • Electronic files created on a computer using programs such as word software are considered to be
    15·1 answer
  • Upgrading only the motherboard will give some performance improvement to a computer system. Why would the improvement be limited
    14·1 answer
  • Enter a formula in cell b7 to calculate the average value of cells b2:b6
    13·1 answer
  • A blank is a link on a web page that leads to another web page.
    14·1 answer
  • What uses HTML hypertext links that users can click to access different locations or information?
    11·1 answer
  • Hey does anybody know how to delete history on a school-issued chrome book, I tried to delete it but it won't let you clear your
    7·1 answer
  • Int a=10 int b=20<br> A=b<br> The new values for a and b are
    11·2 answers
  • Please find one organization that has recently adopted virtualization and summarize their reasons for taking this approach. What
    12·1 answer
  • Why do attackers tend to target public or private Wi-fi networks?
    10·1 answer
  • each data mining technique has its advantages and limitations. which data mining technique mimics the neural structure of the br
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!