Processing Java language
Exercise 6: Post-Lab Exercise: Advanced Decision Structures (15 marks) In this exercise, you will be exposed to more advanced decision structures, including nested if- else-if statements and compound logical expressions. To begin this exercise, download the file TaxCalculator_2018 from D2L. The file contains the code to prompt for and read the two-letter abbreviation of a province as well as the amount of taxable income. What to do: To complete the program, the tax_rate needs to be assigned based on the Table 1 below. To do so, you need to program a decision structure which uses the correct tax rate based on the information entered by the user. When the correct tax rate is assigned, net_income and tax_amount should be calculated based on the determined tax_rate. You will then need to visualize the result by creating a simple bar chart as shown in Figure 1 below. Hint: You should take advantage of compound logical expression (using & & or | |) to minimize the amount of code you need for Saskatchewan and Ontario. After completing your program, test it with the following input values (province & taxable income pairs) AB, $160,000 BC, $80,000 SK, $40,000 Table 1 - Taxable Income Above Up to and Including Marginal Tax Rate British Columbia [BC) $20,000 20.0% $20,000 $35,000 22.5%$35.000 $50.000 $50,000 $65,000 32.5% $65,000 $80,090 $80.000 $100.000 39.395 $100,000 $120,000 $120.000 Alberta (AD) SO $40.000 25.OK $40,000 $80,000 $80,000 $120,000 36.0% $120,000 39.01 Saskatchewan (SK], Ontario (ON) SO $40,000 25.0% $40,000 $60,000 3010% $60,000 $80,000 35.04 $80,000 $100,000 $100.000 $120.000 4510% $120,000 50,0% As an example, when your program is completed, upon entering AB and 18000, the following output should appear:What to submit Submit .pde code file for Exercise 6. Submitting your post-lab Submit a .zip folder of your files to the post-lab d21 dropbox before the start of your next lab session. The zip folder should include the following files: 1. pde file for Exercise 4 2. pde file for Exercise 5 3. pde file for Exercise 6 The submitted zip folder must be named as follow: Lab#i_FirstnameLastname_LabGroup_Section (e.g. Lab3_MikeSmith_Green_L2)