modified prog09

for java project. comments to be added, major code revising needs to be
done. not working at the moment