Question: Need help on java H/W. Thanks I think the teacher wants me to add the jframe to another class instead of having it all in
Need help on java H/W. Thanks


I think the teacher wants me to add the jframe to another class instead of having it all in one class but I don't know how to do that.
Here is the code for the previous assignemt, the one we have to update for this assignment.
import javax.swing.JOptionPane;
public class Income {
public static double calculateTax(double income)
{
double tax = 0;
if(income > 0 && ++income
tax = income * 0.1;
}
else if(income >= 6001 && ++income
tax = income * 0.15;
}
else if(income >= 27951 && ++income
tax = income * 0.27;
}
else if(income >= 67701 && ++income
tax = income * 0.30;
}
else if(income >= 141251 && ++income
tax = income * 0.35;
}
else if(income > 307050){
tax = income * (38.6/100);
}
return tax;
} public static void main(String args[]){ double income; double tax = 0; income = Integer.valueOf(JOptionPane.showInputDialog("Please enter $ amount")); String result = ""; if(income LAB ASSIGNMENTS Please focus on the "formatting" of your output. Make sure to prompt the user appropriately and round the output accordingly. UPDATE ASSIGNMENT 16 TASK 1 USE OBJECT ORIENTATED PROGRAMMING AND CLASS STRUCTURE TO COMPLETE THE TAX PROGRAM. USE GET and SET METHODS Create methods for each portion of the program that does the tax calculation. Use get/set method naming conventions where it applies Update Program: Allow the user to input dollar amount in a Option Pane.showInputDialog and output in option sage Dialog Program should not display error messages if the user presses the X or Cance button progra should display a JOptionPane OW essage Dialo box prompting the user. MAKE SURE PROGRAM S STILL BRC) KEN INTO INDIVIDUAL METHOD 1st Task: Write a program that computes a single filer's income tax burden
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
