First thing, please wrap your code in code tags so that it could be readable. Also, you have the setters and getters in your class, why don't you use them to get the name, quantity and cost of that...