This repository was archived by the owner on Oct 23, 2019. It is now read-only.
Repository files navigation
Shopping List generator with price optimization*
Each Item has a Name and an EAN Code
The Name may be the same
The EAN Code is unique
One Item can have 0:n categories
Stores are selling Items
Each Store has a unique name
The prices for the same Item may vary between the stores
Not every store has the same Items
A shopping list may contain
The EAN Code
The Name of the Product
Product category
It can also contain Items that are not available in any
store.—> Mark them at the output.
The shopping list class should compute the cheapest
possible way to buy all things on it.
A shopping list considers just a few stores.
Example
Shoppinglist
Mars
Bread
Meat
08154711007
Always priorize: EAN, Name, Category
If EAN:
Search in selected stores for the product and pick the
cheapest one.
If Name:
Find stores that are selling products that have this name.
Pick the cheapest store.
If Category:
Find all Products with this category
Search in all stores for all found products
Pick the cheapest one
Implement persistence
Stores, Prices, Items and Categories have to be persistable in a Database
(via Hibernate, JDBC or OrientDB) → ShoppingTester.testPersistence()
Everything should run from an empty database (so the startup script or
schema-generation-scripts have to be placed somewhere within your code)
Extend the ShoppingList class
Add unimplemented methods (and Logic)
About
Final example for database applications.
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.