ok so i have 3 separate classes: Product, Action, and Invoice. Action would be my interface that allows me to add and remove items in my hashmap that is in my Invoice class. my Product class would have the instance variables name, info, id and quantity (correct me if I'm wrong, I should have these as private variables). Also in my Product class are my getters and setters getID etc. Now I am kind of confused on how to add items into my hashmap with ID being the key and name info and quantity being the values.
public class Invoice implements Action<Product> {
private HashMap<Integer, Product> prod = new HashMap<Integer, Product>( );
public void addProd(Product a) {
// confused here
prod.put(getID(),??);
}
}