I'm a Software Developer I who is beginning to think like a Software Developer II. I am tasked with a relatively simple Use Case for a coding challenge following as part of an interview:build a Supermarket Pricing System.
Rules and Requirements: Each item at Super Foods is identified by a unique four-digit code. Today, pricing schemes at Super Foods use the following pricing categories, but beware: prices are constantly changing, and the sales department is always creating new incentives and deals, such as buy one-get-one free.
EG: Chips and salsa (items #6732 and #4900) cost $4.99 together, but they cost $2.49 and $3.49 alone, respectively.
EG2: Buy two toothbrushes $1.99 each, get one free.
EG3: A bottle of wine (item #0923) costs $15.49 and is taxed an additional 9.25%
Having read through Design Patterns, this looks like a natural place for some form of Decorator
Pattern for totaling the sales of objects. A SQLite database, with schema <ID, ObjectName, Price>
will also be useful somehow, though I'm rusty on how we go about making the data access objects in all this.
I'm trying to wrap my mind around this in a full stack MVC mindset, I feel like I might be rusty on something. Is this what the Spring Framework is renowned for? Maybe an even better API for this use case can be recommended?
Thank you for anyone helping me to brainstorm the design of this system out.
Aucun commentaire:
Enregistrer un commentaire