Design and implement a coupon application engine for a shopping cart. Each Item has id, category, and unitPrice. A Coupon has: applicableCategories (one or more), minimumTotalItemRequirement, minimumTotalPriceRequirement, percentageDiscount (0– 100), and valueDiscount (flat currency). Part 1: Given one Coupon and a list of Items in the cart, compute the final cart price after applying the coupon once, honoring minimum requirements; specify how you handle rounding and the order of applying percentage vs. flat discounts. Part 2: Extend your design to support Coupons that apply to multiple categories within the same cart; explain data structures, class interfaces, and time/space complexity; provide unit tests and edge cases (e.g., no eligible items, overlapping categories, zero or negative totals).