Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedFOR 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 asled

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions

Question

=+ What would it look like? Who should deliver it?

Answered: 1 week ago