title: Objects Oriented Design for Two Classes with the same Fields in Java
body: <p>I have two classes called ShoppingCart and StoreInventory. These are used in a convenience store system, which involves the business domain of retail. </p>
  
  <p>They both contain a List products field. However, only the ShoppingCart should be able to calculate its own totalCost of all products in the list. Also, these two are suspiciously ENTIRELY different objects but have the same fields (addendum : and METHODS, except ShoppingCart can calculate its total value).</p>
  
  <p>What are the best ways thru interfaces and inheritance can this be solved?</p>