Question: 3. Computing Taxes program. This is the problem 5.2 on page 228 of your text Create a class named a. b. c. Do not create

 3. Computing Taxes program. This is the problem 5.2 on page

3. Computing Taxes program. This is the problem 5.2 on page 228 of your text Create a class named a. b. c. Do not create instance variables or a constructor. Create a method named calsulateTax and it should return a double. It should have two ments. One argument will be String named macitalStatus The other argument should be a double named taxablelncome d. You will need nested if statements The outside test should be whether matitalStatus is equal to married. Remember this is a String and you should use String comparison. An example of the if else statement is on page 200. An example of the String comparison is on you need to use the equals Inside the comparison you need another set of if statements for the levels of taxablelncome. You will need to use a compound if statement to compare the various income levels. See top of page 212. Return the income tax due as a double. e. Create a T f. Import Scanner g Create a Scanner object h. Prompt the user for their marital status and assign it to a String i. Prompt the user for their income and assign it to a double. J. Create an object of type TaxCalsulater k. Create a taxQue double variable . Call the salculateas method and assign the output to taxQue m. Print the martial status with appropriate words "Marital Status is: xXx0X n. Print the income with appropriate words. o. Print the totallocome with appropriate words. 4. In this problem, you are going to enhance the BaokAcsouot class of Chapter 3, page 94 and 95. You should already have this coded. We are going to enhance it by making the deposit and withdraw methods more realistic. You could not withdraw any amount of money if your balance was less than or equal to O. You also could not deposit a negative amount. a. Create a new class named b. If you have it copy BankAssouot to Eobapsed8ankAsount If you no longer have the BankAccount class, copy the Ba0kAcsouot class form page 94 and 95. In the deposit method, check to see if the deposit is negative. If it is, then print "You cannot make a negative deposit" and do not make the deposit. If it is not, make the deposit. c. d. In the withdraw method, check to see if the balance-the amount to withdraw is less than Q. If it is then print "You do not have enough money to make the withdrawal. If it is not, make the withdrawal. e. Create a EobaosedBankASSOHOttester by elther copying the prior one or entering the code from the text on page 101. Make sure the reference to BankAcseunt is changed to f. Enter the code as it appears on page 101. e Make a negative deposit. h. Print the balance of baro Checking account. 3. Computing Taxes program. This is the problem 5.2 on page 228 of your text Create a class named a. b. c. Do not create instance variables or a constructor. Create a method named calsulateTax and it should return a double. It should have two ments. One argument will be String named macitalStatus The other argument should be a double named taxablelncome d. You will need nested if statements The outside test should be whether matitalStatus is equal to married. Remember this is a String and you should use String comparison. An example of the if else statement is on page 200. An example of the String comparison is on you need to use the equals Inside the comparison you need another set of if statements for the levels of taxablelncome. You will need to use a compound if statement to compare the various income levels. See top of page 212. Return the income tax due as a double. e. Create a T f. Import Scanner g Create a Scanner object h. Prompt the user for their marital status and assign it to a String i. Prompt the user for their income and assign it to a double. J. Create an object of type TaxCalsulater k. Create a taxQue double variable . Call the salculateas method and assign the output to taxQue m. Print the martial status with appropriate words "Marital Status is: xXx0X n. Print the income with appropriate words. o. Print the totallocome with appropriate words. 4. In this problem, you are going to enhance the BaokAcsouot class of Chapter 3, page 94 and 95. You should already have this coded. We are going to enhance it by making the deposit and withdraw methods more realistic. You could not withdraw any amount of money if your balance was less than or equal to O. You also could not deposit a negative amount. a. Create a new class named b. If you have it copy BankAssouot to Eobapsed8ankAsount If you no longer have the BankAccount class, copy the Ba0kAcsouot class form page 94 and 95. In the deposit method, check to see if the deposit is negative. If it is, then print "You cannot make a negative deposit" and do not make the deposit. If it is not, make the deposit. c. d. In the withdraw method, check to see if the balance-the amount to withdraw is less than Q. If it is then print "You do not have enough money to make the withdrawal. If it is not, make the withdrawal. e. Create a EobaosedBankASSOHOttester by elther copying the prior one or entering the code from the text on page 101. Make sure the reference to BankAcseunt is changed to f. Enter the code as it appears on page 101. e Make a negative deposit. h. Print the balance of baro Checking account

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!