Hey buddy,
I attached two zip files, one of them in AverageNumber.zip which is a web application (source included) in order to deploy it, first extract it and then copy the extracted folder to webapps directory of your tomcat,
the second one is a netbeans project (AverageNumber_nbproject.zip), if you download the netbeans 6.0 IDE. you can extract the zip file and open it with netbeans.
download the NetBeans 6.0 IDE from :
Welcome to NetBeans
it'll be solve most of your programming problems.
I hope it would be helpful
Regards,
james