Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/solahkay/binar-bej-challenge
Repository for challenge's submission MSIB Batch 5 Binar Academy - Back End Java.
https://github.com/solahkay/binar-bej-challenge
backend git java java8 java8-learning java8-study maven
Last synced: 12 days ago
JSON representation
Repository for challenge's submission MSIB Batch 5 Binar Academy - Back End Java.
- Host: GitHub
- URL: https://github.com/solahkay/binar-bej-challenge
- Owner: solahkay
- Created: 2023-08-19T09:55:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-03T02:41:55.000Z (about 1 year ago)
- Last Synced: 2024-11-22T08:43:39.886Z (2 months ago)
- Topics: backend, git, java, java8, java8-learning, java8-study, maven
- Language: Java
- Homepage:
- Size: 60.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Binar BEJ Challenge 3
![Static Badge](https://img.shields.io/badge/status-uwu-brightgreen)
Independent Study batch 5 Binar Academy - Backend Java
Challenge 3 assignment - BinarFud## Disclaimer
This is not a real-world project; this project is only for educational purposes.## 📌 Features
- Shows menu with price
- Order menu
- Add quantity amount
- Multiple order menu
- Shows order detail
- Make receipt## 📥 Getting Started
### Prerequisites
- Java (version 8 or higher)
- Maven
- Git### Installation
Clone this repository first:
```git
git clone [email protected]:solahkay/binar-bej-challenge.git
```change the directory to the root of the project:
```git
cd binar-bej-challenge
```create branch `challenge_3`:
```git
git branch challenge_3
```switch to branch `challenge_3`:
```git
git switch challenge_3
```don't forget to pull the code in remote repository:
```git
git pull origin challenge_3
```and then the project are ready to use!
## 🎇 ERD
```mermaid
erDiagram
MENU ||--|| HAVE : is
MENU {
Long id PK
String itemName
Integer price
}
ORDER ||--o{ HAVE : has
ORDER {
Integer total
Long totalAmount
Menu menu
}
HAVE {
Long id PK
}
```## 🔧 Usage
[![usage.gif](https://i.postimg.cc/CKbYFg25/usage.gif)](https://postimg.cc/v18Czpbw)
For running this project, use command:
```maven
mvn exec:java
```OR
you can build this project with `maven`:
```maven
mvn clean package
```and then run the `.jar` file in *target* folder:
```
java -jar target/binar-bej-challenge-3.0-SNAPSHOT.jar
```## 🔗 Workflow
```mermaid
graph RL
A[View] --> B[Service]
B --> C[Repository]
C --> D[Entity]
G[Dataimport] --> B
H[Generator] --> B
I[App.java] --> A
```**CSV format**
```
[menuName];[price]// replace without bracket
```Example:
```
Nasi Goreng;15000
Mie Goreng;13000
Es Teh Manis;3000
Nasi + Ayam;18000
Es Campur;5000
```The dataimport class will import the menu from `menu.csv` and the service class will validate whether the menu already exists with the same name. If true, then skip adding.
The `receipt.txt` file is created in the root project or the folder where you run the Java `.jar` file after successfully placing the order.
```
==========================
BinarFud
==========================Terima kasih sudah memesan
di BinarFudDi bawah ini adalah pesanan anda
Nasi Goreng 21 315.000
Nasi + Ayam 2 36.000
Es Teh Manis 51 153.000
Es Campur 1 5.000
------------------------------------+
Total 75 509.000Pembayaran : BinarCash
==========================
Simpan struk ini sebagai
bukti pembayaran
==========================
```