Examlex

Solved

Suppose You Want to Write an If Statement with Multiple

question 65

Multiple Choice

Suppose you want to write an if statement with multiple alternatives to print out the single tax bracket that someone is in, based on their income. Assume 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") ;
}
7if (income < 20000)
{
System.out.println("Low-Middle tax bracket") ;
}
If (income < 30000)
{
System.out.println("Middle tax bracket") ;
}
System.out.println("High tax bracket") ;


Definitions:

Selling Prices

The amount a product is sold for, which can be influenced by market demand, cost of production, and competitive pricing.

Departmental Predetermined Overhead Rates

Rates used to allocate overhead costs to products more accurately by setting individual rates for different departments.

Machine-Hours

The total number of hours that machinery is in operation during a specific period, often used as a basis for allocating manufacturing overhead.

Markup

The amount added to the cost of goods to cover overhead and profit when determining the selling price.

Related Questions