Question
FOR JAVA... FOR JAVA... A county collects property taxes on assessment values of property, which is 60 percent of the property's actual value. If an
FOR JAVA... "FOR JAVA... A county collects property taxes on assessment values of property, which is 60 percent of the property's actual value. If an acre of land is valued at $10,000, it's assessment value is $6,000. The property tax is then $0.64 for each $100 of the assessment value. The tax for the acre assessed at $6,000 will be $38.40. Create a GUI application that displays the assessment value and property tax when a user enters the actual value of a property."
HERE IS MY CODE... package propertytaxdemo; /** * * @author amanda reeder */ import javax.swing.*; //swing class import java.awt.event.*; //event handling public class PropertyTaxDemo extends JFrame { //to hold components private JPanel panel; private JLabel actualValueLabel; private JLabel assessmentValueLabel; private JLabel propertyTaxLabel; private JTextField actualValueTF; //text field private JButton calcButton; private final int WINDOW_WIDTH = 250; private final int WINDOW_HEIGHT = 200; //constructor public PropertyTaxDemo() { setTitle("Property Tax"); setSize (WINDOW_WIDTH, WINDOW_HEIGHT); setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); buildPanel(); add (panel); setVisible (true); } private void buildPanel() { actualValueLabel = new JLabel ("Enter actual value $"); assessmentValueLabel = new JLabel (); propertyTaxLabel = new JLabel (); actualValueTF = new JTextField (8); calcButton = new JButton ("Calculate"); calcButton.addActionListener (new CalcButtonListener()); panel = new JPanel (); //components in panel panel.add (actualValueLabel); panel.add (actualValueTF); panel.add (calcButton); panel.add (assessmentValueLabel); panel.add (propertyTaxLabel); } private class CalcButtonListener implements ActionListener { @Override public void actionPerformed (ActionEvent e); { String input; double amount; double assessmentValue; double propertyTax; input = actualValueTF.getText(); amount= Double.parseDouble (input); //calculates assessmentValue = amount * 0.6; propertyTax = assessmentValue * 0.64 / 100; assessmentValueLabel.setText ("Assessment value: $" + assessmentValue); propertyTaxLabel.setText ("Property tax: $" + propertyTax); } } public static void main (String args []) { new PropertyTaxDemo (); } }
THIS IS THE ERROR I GET WHEN I TRY TO COMPILE USING NET BEANS 8.2 error: missing method body, or declare abstract public void actionPerformed (ActionEvent e);
PLEASE HELP!! THANK YOU!!
Start PagePropertyTaxDemo.java x 58 59 60 61 62 63 panel.add (propertyTaxLabel) private class CalcButtonListener implements ActionListener @Override ublic void actionPerformed (ActionEvent e 65 67 68 69 String input; double amount; double assessmentValue; double propertyTax; propertytaxdemo.PropertyTaxDemo Output X 1> IDE Log x PropertyTaxDemo (dean'jar) x clean init: deps-jar Created dir: C:\Users\alree\ Documents\NetBeansProjects\ PropertyTaxDemo\build Updating property file: CNUserstalree\Documents NetBeansProjects PropertyTaxDemo\build\built-jar.properties Created dir: C:\UsersalreeDocumentsNetBeansProjectsPropertyTaxDemo buildvclasses Created dir: C:\Userslalree\ Documents NetBeansProjects\PropertyTaxDemo\build\empty Created dir: CNUserslalree\ Documents\NetBeansProjects\PropertyTaxDemo\build\generated-sourceslap-source-output Compiling 1 source tile to C:NUserslalreeDocumentsetBeansProjecesPropertyTaxDemovbuiidvclasses C:UserslalreelDocumentsNetBeans Projects\PropertyTaxDemolsrcipropertytaxdemo\ PropertyaxDemo.java:4 error: missing method body, or declare abstract public void actionPerformed (ActionEvent ) l error C:sersalree Documents NetBeansProjects PropertyTaxDemo Inbproject\build-impl.m:930: The following error occurred while executing this line CaUserslalreeDocuments NetBeansProjiectsiPropertyTaxDemoInbproject build-impl.mi:270: Compile failed: see the compiler ezror output for details BUILD FAILED (total time: 5 seconds) 8UTLD TATLED IEoe i: s ecn 2 22EspeEEztasDerainspr38 E m127cope asledStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started