The developed application allows to generate an imitation of a store receipt (bill) with goods. The input data takes a set of parameters in the format (itemId is the identifier of the product, quantity is its quantity. For example: 3-1, 2-5, 5-1. Card-1234 is also passed. Card-1234 means that a discount card with number 1234 has been found. As a result of the application's operation, the generated receipt is print in console or to a file.
Client
Database
DevOps
To run tests, run the following command
yarn test test
Clone the project
git clone https://github.com/Petrovich-A/Bill-generator
Install dependencies
gradle --refresh-dependencies
- Among the goods, provide for promotional ones. If there are more than five of them in the bill, then make a 10% discount on this position. Show this information on your bill.
- Implement exception handling (for example, product with id or file does not exist, etc.).
- Implement bill output to a file.
- Describe the project in the README.md file (the stack is used, the run instructions).
- Use the gradle project builder.
- Place the source code of the project in any of the public repositories (bitbucket, github, gitlab).
- Organize reading of initial data (products and discount cards, the format is the same) from files (in this case, you can pass the file name to the java command parameter set).
- Cover the code with unit tests (at least 70%).
- * Replace storage of source data in files with PostgreSQL; make 2 tables (product and discount_card); Operation DDL must be stored in src/main/resources in a file with .sql extension; store the database connection settings in application.properties.
- ** Implement a RESTFUL interface (Servlet, Spring) (for example, receive a bill via GET http://localhost:8080/bill?itemId=1&itemId=1).
- *** Deploy the application and PostgreSQL in Docker Expand the functionality at your discretion.
Distributed under the no License. See LICENSE for more information.
Petrovich Alexandr - linkedin - a.piatrovich@gmail.com
Project link: Bill-generator