An open API service indexing awesome lists of open source software.

https://github.com/schultyy/layer-exercise

Exercise about software layers for @codepadawans
https://github.com/schultyy/layer-exercise

Last synced: about 1 year ago
JSON representation

Exercise about software layers for @codepadawans

Awesome Lists containing this project

README

          

# Shop exercise

Here you should practise how to structure your application.

## Tasks

1. Clone this repository

2. Define, which class goes into which layer (view, domain,
infrastructure). Create a new folder for each layer and move the classes into their folders.

3. Add the missing require statements.

4. All method bodies in `shop_manager.rb` are currently empty. Implement all method bodies. You only need the `@shopping_card` and `@database` variables. Also you need to use the `Article` class.

5. Complete the `menu.rb` class so that in the end you can order articles, show all available articles, show shopping card and so on.

6. Add a new option "Add milk to shopping cart" (because I always forget that) which will add milk to the database and therefore display it when I list all my items.

7. When a user tries to add an article to their shopping card which does not exist, the user should see an error that this is not possible.

Help:
- [Lightning sessions Software architecture] (https://github.com/CodePadawans/lightning-sessions/blob/master/software_architecture.md)