Given the following tax table information, write Java code to assign the double taxRate appropriately, given the double pay. Select the selection statement (if, if-else, switch) that makes the most sense.
If pay is more than 100,000, tax rate is 40%
If pay is more than 60,000 and less than or equal to 100,000, tax rate is 30%
If pay is more than 30,000 and less than or equal to 60,000, tax rate is 20%
If pay is more than 15,000 and less than or equal to 30,000, tax rate is 10%
If pay is more than 5,000 and less than or equal to 15,000, tax rate is 5%
If pay is less than or equal to 5,000, tax rate is 0%
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q25: The following for loop is odd in
Q26: Rewrite the following if-else statement using a
Q27: Write the code to display an ImageView
Q28: Code Example Ch 06-1
In the following example,
Q29: Which of the following would rotate an
Q30: Write a do loop to obtain a
Q32: If a break occurs within the innermost
Q33: How many times will the System.out.println("*"); statement
Q34: Describe a situation where you should use
Q35: Code Example Ch 06-1
In the following example,
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents