product.java and purchase.java updated