{"id":23863168,"url":"https://github.com/codingnagger/supermarket-kata","last_synced_at":"2025-02-22T12:26:58.898Z","repository":{"id":211568007,"uuid":"437349967","full_name":"CodingNagger/supermarket-kata","owner":"CodingNagger","description":"Supermarket kata http://codekata.com/kata/kata01-supermarket-pricing/","archived":false,"fork":false,"pushed_at":"2021-12-11T18:03:04.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-03T07:52:30.645Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodingNagger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-11T17:45:21.000Z","updated_at":"2021-12-11T18:03:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a763162-0362-4d49-8247-2da118b702bf","html_url":"https://github.com/CodingNagger/supermarket-kata","commit_stats":null,"previous_names":["codingnagger/supermarket-kata"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodingNagger%2Fsupermarket-kata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodingNagger%2Fsupermarket-kata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodingNagger%2Fsupermarket-kata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodingNagger%2Fsupermarket-kata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodingNagger","download_url":"https://codeload.github.com/CodingNagger/supermarket-kata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240173488,"owners_count":19759798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-03T07:49:42.301Z","updated_at":"2025-02-22T12:26:58.887Z","avatar_url":"https://github.com/CodingNagger.png","language":"Java","readme":"# QMetric Java Exercise\n\nOur Java coding exercise is inspired by \n[PragDave Supermaket Kata](http://codekata.com/kata/kata01-supermarket-pricing/). \n \n\u003e [...] to experiment with various models for representing money and prices that are flexible enough to deal with \n\u003e[a variety of] pricing schemes, and at the same time are generally usable (at the checkout, for stock management, \n\u003eorder entry, and so on). \n\n## The task\n\nThis project provides the code for an initial model of a supermarket. \nThe supermarket's inventory consists of _products_ that can be sold _by unit_ (e.g. a can of baked beans) or _by weight_\n(e.g. loose carrots).\nThe total price of a shopping basket has currently been calculated as a simple sum of its items. \n  \nThe supermarket would like to offer _pricing discount_ schemes, for example:\n- Buy one, get one free\n- Buy two items for £1\n- Buy three items for the price of two\n- Buy one kilo of vegetables for half price\n\nSome discounts would be applicable for single products (e.g. a can of baked beans), while others could apply across a \ngroup of products (e.g. vegetables).\n\nYour task is to extend the functionality of Basket to implement _a component_ that can calculate the __total amount__ \nto pay for the items in a basket, __including any discounts that would be applicable__ for the current state of the \nbasket.\n\n* You should think about how the relationships between Basket, Item, and Product will need to be refactored to achieve \nthis\n* You should consider how your solution could be extended to provide more complicated discount schemes\n\nFirst and foremost this is an opportunity for you to demonstrate your _software design_ skills within a small problem \nspace. \n\nPlease read through the description carefully and implement a solution that includes __at least one__ of the pricing \ndiscount schemes described.\n\nWe would like you spend __no more than one hour__ on this task. \n \n### We are looking for...\n\n- Clean, tidy, tested, and __working__ code (with accurate pricing calculations) \n- Use of appropriate design patterns and [SOLID](https://en.wikipedia.org/wiki/SOLID) principles\n- Small incremental changes with good comments, as demonstrated in your commit history\n\n**Above all, we would rather see a small codebase with fewer features than failure to observe the points above.**\n\nYou may add any libraries you feel are appropriate.\nBut we don't expect to see databases or other persistence layers, dependency injection frameworks, web servers, REST \nAPIs, or web frameworks;\nwe are **not** looking for a fully functioning supermarket system!\n\n### Tips\n\n- Plan your time before you start coding. Start small and add features incrementally\n- Focus on the pricing model and the behaviour of your components -- you only need to demonstrate that your design \nworks, rather than an exhaustive model of numerous supermarket items \n- If you run out of time, describe your intentions in the [NOTES.md](NOTES.md) file\n\nWe really don't want you to over-engineer the solution -- and you really don't have time for that! -- but be prepared \nto extend the functionality in the next step of the interview process. \n\n## Submission\n\nClone or fork this project into a _publicly accessible_ git repository of your own, and email the URL to to \n[tpadberg@qmetric.co.uk](mailto:tpadberg@qmetric.co.uk). \n\nGood Luck!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingnagger%2Fsupermarket-kata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodingnagger%2Fsupermarket-kata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingnagger%2Fsupermarket-kata/lists"}