Completed the function getProducts so it can connect to the database and
returns an ArrayList of Product.