https://github.com/awais-vteams/bigpoint-gmbh
Bigpoint GmbH Assessment
https://github.com/awais-vteams/bigpoint-gmbh
Last synced: 7 months ago
JSON representation
Bigpoint GmbH Assessment
- Host: GitHub
- URL: https://github.com/awais-vteams/bigpoint-gmbh
- Owner: awais-vteams
- Created: 2024-06-30T04:05:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-30T05:27:46.000Z (over 1 year ago)
- Last Synced: 2024-07-01T07:02:37.820Z (over 1 year ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## Task 1
Write an inventory class with three functions:- addItem
- removeItem
- getStockThe two functions addItem and removeItem will take item data with id and amount. It should be possible to add/remove more than one item of the same type.
getStock should return the current amount of an item type.
Please also write unit tests for all three functions.### Solution
task1 folder contains the `Inventory` class and Test cases. To run the test make sure `composer` install.
```
cd task1
composer install // or composer update
vendor/bin/phpunit src/InventoryTest.php
```## Task 2
In the index.php file you will find some data that has to be processed in different ways. Write functions/class to achive the correct outputs as stated in the file.### Solution
task2 folder updated the index.php file. Also added the `ProcessData` class.