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
Which one of the following is a correct declaration for a method named passAList that has as arguments an array list myList of s
alekssr [168]

Answer:

"public static void passAList(ArrayList<Integer> myList, int[] intArr)", is the correct answer for the above question.

Explanation:

Missing information :

  • The option is missing but the question states "choose from the following". The correct defining syntax is defined above.

Detailed Explantion :

  • The above question asked about syntax which takes the value of list and array as an argument.
  • It is already defined in the above syntax.
  • And the value is passed by the user at the time of function call.
  • The array list is defined by the help of the ArrayList class and the array is defined by the help of the "[]" symbol.

3 0
3 years ago
Henry is sent to work with a customer at the company’s satellite branch in another town. During his visit, he notices that most
Dmitriy789 [7]

Answer:

Correct option is B: Train the employees on why these issues are security concerns

Explanation:

When employees do not follow corporate guidelines regarding information systems and security, it is the duty of organizations to ensure that every employee knows the importance of following these guidelines due to the security risk the company might face. Hence, it is Henry's duty to ensure that he trains the employees on why their not following guidelines and looking at their personal emails are security concerns. This way he is sure that the employees are aware of the risks and any further breach in policy from them would require consequences.

7 0
3 years ago
Maia notices that her paragraphs are too close to one another. She wants to increase the space. Which arrangement of steps does
kirza4 [7]

Maia can quickly and easily adjust the spacing that exists before and after her paragraphs. To achieve this, she should select her paragraphs and click the Line and Spacing command in the Paragraph command group. She should be able to click the Add Space Before Paragraph from the drop-down menu. The paragraph spacing should change. In the same drop-down menu, she can also select the Line Spacing Option. This will open the Paragraph dialog box. This option will let her control how much space She wants before and after the paragraph. These two options are placed and indicated down below the Paragraph dialog box.

7 0
3 years ago
Read 2 more answers
: Describe the type of gameplay seen during early video games (ex. Spacewar!, Pong).
Alexeev081 [22]

Answer:

Computer scientists began building rudimentary games and simulations on mainframe computers in the 1950s and 1960s, with MIT's Spacewar! in 1962 being one of the first such games to be played with a video display. The first consumer-ready video game hardware arrived in the early 1970s, with the Magnavox Odyssey, the first home video game system, and the first arcade video games from Atari, Computer Space and Pong, the latter of which was later transformed into a home console version. Pong's success in arcades and at home prompted numerous firms to create clones of the game, resulting in a market contraction in 1978 owing to oversaturation and a lack of innovation.

8 0
2 years ago
Very few games have any sort of narrative, not even a simple one that involves setting the mood through color, sound, environmen
Vladimir79 [104]

Answer:

B. False

Explanation:

Numerous amount of games have narrative, there is an entire genres built around narratives. Any RPG game has a narrative and even bog standard FPS games have some sort of backstory and effects setting a mood.

6 0
2 years ago
Other questions:
  • If you enjoy working with livestock, the best cluster in which to research careers would be: A. Health Science. B. Agriculture,
    11·1 answer
  • The device used to connect a network to the internet is called a
    7·1 answer
  • A potential threat to administrators’ ability to manage the correctional system is
    12·1 answer
  • Your customer, Mykel, is ordering a custom-built computer for his home office and isn’t sure which components should be the high
    12·1 answer
  • In a CPMT, a(n) ____ should be a high-level manager with influence and resources that can be used to support the project team, p
    10·1 answer
  • Each AWS region is composed of two or more locations that offer organizations the ability to operate production systems that are
    7·1 answer
  • Travis just got promoted to network administrator after the previous administrator left rather abruptly. There are three new hir
    14·1 answer
  • What is the code i need to do
    12·1 answer
  • Your network has been having problems lately when users are participating in video conferences - the video and audio stutters ve
    13·1 answer
  • What are the main types of database end users,? Discuss the main activi-ties of each
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!