Question: i need help with this java code. im in initial java class i can not use arraylist. please read the direction attached in the picture.make

2. TaxCalculator.java (10 points) . Write a Java program that will request from the user his/her marital status as a character or a string (watch carefully the sample run). Remember that a character cannot be read singly. JOptionPane.showinputDialogreturns a String and there is no nextCharo) method of the Scanner class. Your program will request from the user his/her salary. . Use the tax rate chart below to compute the tax on the salary. Display the marital status (the word), base salary and the tax in a JOptionPane NOTE - display base salary and tax due formatted with commas, dollar signs and 2 decimal places. Use DecimalFormat This program will be functionally decomposed into at least the following methods: an input method to return the marital status lyour choice whether String or character return) o an input method to return the salary (this is a monetary value, use a double) o a calculation method to determine tax bracket, calculate the tax and return the tax a method to display all of the data as shown below in the sample run 0 Watch the variable/identifier naming --- variables/identifiers should be descriptive Federal Tax Rate Schedule (Horstmann. 2015) Single and The tax is of the amount over Income $32,000 $3,200 + 25% $32,000 Married and The tax is Of the amount over Income $64,000 $6,400 + 25% $64.000 the tax o a method to display all of the data as shown below in the sample run Watch the variable/identifier naming --- variables/identifiers should be descriptive Federal Tax Rate Schedule (Horstmann, 2015) Single and The tax is of the amount over Income $32,000 $3,200 + 25% $32,000 Married and The tax is of the amount over Income $64,000 $6,400 + 25% $64,000 A sample run of this program might look like this (user input is in bold): Enter marital status: S Enter salary: 38000 Sample output --- yours may be in a JOptionPane Given your single marital status and your base salary of $38,000.00, your tax is: $4,700.00 Delivvaki
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
