present two distinct design choices that
address the same design problem: enable the "display, selection, and
invoice of products” for a web store. The web store should display the
available products and allow the user to select the quality of each
item they want to purchase. After items are selected, an invouce should
be generated detailing which items were purchase, how many, extended
cost, tax, shipping, and total cost.
In terms of design specifications, design quality, or evolutionary requirements:
|Separated Concerns splits the of display and selection of products from invoice generation, and also from management of the products. Product selection data is passed from Store display to Invoice. Product data is a shared collection entity for both classes (possibly a file or database).||The integrated design uses a single class to manage display, selection, and invoice creation using conditinal logic to switch between product display and invoice modes. Product information is embedded in the class as an attribute (possibly a static array).|
Compare the two designs below by selecting which design is the "best" answer to the question asked.