/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open...
This question has been answered
Question

JAVA Programming beginning. the doc is the instruction

2 Attachments
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ import java.util.Scanner; /** * * @author Debashish */ public class HW2 { public static void main(String args[]) { //Write the declaration for Scanner class here System.out.print("Enter your income: "); //Write your code to read income from the user //Declare two variables to store exemptions //Write your code to calculate federal tax //Write your code to calculate provincial tax //Write your code to calculate total tax //Write 3 print/println statements to output the information. } }
Background image of page 1
(C)ITM-200 HW-2 (1%) Submission: Please do not submit the .java fle instead copy all the codes in a text fle (You can use Notepad) and aTach your output as a separate fle (You can take print screens) Write a program that will calculate tax for an input income. I have atached a skeleTon java fle To assisT you. You can Follow The skeleTon or you can Follow your own, whichever is comForTable For you. Your program should calculate tax based on the following example: Federal tax rate on the ±rst $45,282 is 15% Ontario provincial tax rate on the ±rst $41,536 is 5.05% Basic personal exemp²on amount for federal is: $11,327 Basic personal exemp²on amount for Ontario province is: $9863 So, if a person's income is $40,000 Then, Federal tax = 15% of ($40,000-$11,327) = 15% of $28,673 = $4300.95 Provincial tax= 5.05 % of ($40,000 - $9863) = 5.05 % of $30137 = $1521.9185 So, total tax payable= $4300.95 + $1521.9185 = 5822.8685 Sample input/output Enter your income: 40000 Your payable Federal tax is: $4300.95 Your payable Provincial tax is: $1521.9185 Total payable tax is: $5822.8685
Background image of page 1
Answered by Expert Tutors

ur laoreet. Nam risus ante, dapibus

ec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. P
Step-by-step explanation

amet, consectetur adipisc

nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentes
1 Attachment
HW2.java
java
The student who asked this rated it
Get unstuck

443,297 students got unstuck by Course
Hero in the last week

step by step solutions

Our Expert Tutors provide step by step solutions to help you excel in your courses