public class TestProduct { public static void main(String a[]) { // let's test our product class Product p = new Product("Coca Cola can", 0.50, 1234, "soft drinks"); Product p2 = new Product("Sprite can", 0.50, 1235, "soft drinks"); // should give 0 System.out.println(p.getName() + ": " + p.getNumber()); p.buy(100); p2.buy(100); p.sell(1); p.sell(1); p.sell(4); p.sell(1); // should be 93 System.out.println(p.getName() + ": " + p.getNumber()); p.sell(200); // should be Coke:0 and Sprite:??? System.out.println(p.getName() + ": " + p.getNumber()); System.out.println(p2.getName() + ": " + p2.getNumber()); } }