stuck
I keep getting an error on line 48, cannot resolve symbol. The 'H" in HoursPerYear of the calculation section is the error, but I am new to java and I don't know way. Please Help!
*/
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class KilowattApplet extends Applet implements ActionListener
{
Label welcome = new Label("Welcome to the Appliance Energy Calculator:");
Label costKwhrLabel = new Label("Please enter the cost per kilowatt-hour in cents:");
TextField costKwhrField = new TextField(5);
Label HoursPerYearLabel = new Label("Please enter the kilowatt-hours consumed:");
TextField HoursPerYearField = new TextField(5);
Button calcButton = new Button("Calculate ");
Label outputLabel = new Label("Click the Calculate button to display the average enery cost");
public void init()
{
add(costKwhrLabel);
add(costKwhrField);
add(HoursPerYearLabel);
add(HoursPerYearField);
add(calcButton);
add(outputLabel);
calcButton.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
//Converting input to values
double costKwhr = Double.parseDouble(costKwhrField.getText());
double consumedKwhr = Double.parseDouble(HoursPerYearField.getText());
//Variable used in formula and output
double average;
//Calculation
average = (costKwhr/100) * HoursPerYear;
//Output
outputLabel.setText("The average annual cost to operate this appliance is $" + Math.round (average* 100/100D));
}
}

