/*
Programer: Joshua Howard
Program: Kilowatt
Date: 4/16/2010

*/

import java.applet.*;
import java.awt.*;
import java.awt.event.*;

public class KilowattApplet implements ActionListener
{

	public void init ( )
	{


	//declare (create) object components

	Label welcomeLabel = 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);
	Lable HpyLabel = new Label("Please enter the kilowatt-hours consumed:");
					TextField HpyField = new TextField(5);


	Button calcButton = new Button("Calculate");

    Label outputLabel = new Label("Click the Calculate button to display the average energy cost");

	}

	// add ActionListener to Object

	calcButton.addActionListener(this);

	//Declare Variables

	double costKwhr = Double.parseDouble(costKwhrField.getText());
	double kwHours = Double.parseDouble(HpyField.getText());
	double average;

	public void actionPerformed(ActionEvent e)
			{