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
dedylja [7]
3 years ago
7

Suppose you want to write an if statement with multiple alternatives to print out someone's tax bracket based on their income. A

ssume the integer variable income holds the annual income. What is wrong with the following if statement?if (income < 10000)
{
System.out.println("Lowest tax bracket");
}
if (income < 20000)
{
System.out.println("Low-Middle tax bracket");
}
if (income < 30000)
{
System.out.println("Middle tax bracket");
}
System.out.println("High tax bracket");

a) The conditions are in the wrong order; the check for the highest bracket should be first
b) The conditions should use an if else/if else sequence, not just independent if statements
c) The conditions should be a switch statement instead
d) Nothing is wrong - the if statement will correctly print out the tax brackets
Computers and Technology
1 answer:
soldier1979 [14.2K]3 years ago
6 0

Answer:

b) The conditions should use an if else/if else sequence, not just independent if statements

hope it answers the question:)

You might be interested in
What is a hash function? A. A function that computes the location of the values in the array B. A function has allocated memory
galina1969 [7]

Answer:

A hash function is a function which when given a key, generates an address in the table. The example of a hash function is a book call number. Each book in the library has a unique call number. ... The later is always possible only if you know (or approximate) the number of objects to be proccessed.

Explanation:

A

3 0
3 years ago
Read 2 more answers
The danger in using soy solvents is that they: A) Are not approved by the FDA B) Take paint off of surfaces where used C) Are no
tatuchka [14]

Take paint off surfaces

sp2

8 0
3 years ago
Read 2 more answers
Susan is a network administrator and is setting up her company's network. In the process to determine an open port on a firewall
Dovator [93]

Answer:

poop head is big butt

Explanation:

soorru

4 0
2 years ago
_______a file transfers a copy of the file from the storage media into your computer's memory?
Nana76 [90]
It's opening. I just took PF test (:
5 0
4 years ago
Read 2 more answers
What is a video input device? .​
iren2701 [21]

Video input devices are used to scan images or videos from the outside world to the computer. The information can be stored in a multitude of formats depending on the user's requirements. Examples of types of video input devices include: digital camera. Digital camcorder.

7 0
3 years ago
Other questions:
  • Assume that to_the_power_of is a function that expects two int parameters and returns the value of the first parameter raised to
    11·1 answer
  • How efficient would a 6-bit code be in asynchronous transmission if it had 1 parity bit, 1 start bit, and 2 stop bits?
    5·1 answer
  • 1. Create an array of ints with 20 elements. With a random number generator, seeded with time, assign a random number between 1
    8·1 answer
  • A network with 10 bits remaining for the host portion will have how many usable host addresses?
    11·1 answer
  • Why is the following statement true - ideally, your information is abbreviated
    10·2 answers
  • Differences between the first four generations of computers​
    12·1 answer
  • How Oracle 12c advances the security discussion?
    12·1 answer
  • A computer with 5 stage pipeline like the one descrive in class delas with conditional branches by stalling for the next three c
    5·1 answer
  • Color ___ indicates that one color is dominating a picture.
    7·1 answer
  • An engineer is designing an HTML page and wants to specify a title for the browser tab to display, along with some meta data on
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!