Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Decisions (if/else, switch/case, relational operators) Exercise 1: New Sales Tax in Metro Atlanta Area (10pt) Starting from April 1, 2018, the sales tax rates in

image text in transcribed

Decisions (if/else, switch/case, relational operators) Exercise 1: New Sales Tax in Metro Atlanta Area (10pt) Starting from April 1, 2018, the sales tax rates in the metro Atlanta area have been increased to the following: County Inside City of Atlanta? Sales Tax Rate Yes 8.9% Fulton No 7.75% Yes 8.9% Dekalb No 8.0% Cobb N/A 6.0% Write a simple Java program to determine the sales tax rate for any location within the metro Atlanta area. Save it as Hw3_Ex1.java. Your program should: (i) Prompt the user to enter the county: 1 for Fulton; 2 for Dekalb; 3 for Cobb; (ii) If in the Fulton or Dekalb county, prompt the user to enter whether the location is inside the city of Atlanta or not: 1 for Yes; 2 for No; If in the Cobb county, then no need to check; (iii) Determine the sales tax rate using the nested branches and multiple alternatives approaches as discussed in class. Hints: Two levels of if-else statements (The first level is about the county, the second level is about whether it is inside the city of Atlanta or not) To determine the county, use if...else if... else statement. (iv) Print out the sales tax rate

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

Summarize job analysis for team members.

Answered: 1 week ago