-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CS2113-W14-4] Pharmacy Inventory & Logistics Ledger (PILL) #28
base: master
Are you sure you want to change the base?
Changes from 162 commits
ec508d4
cb91ae9
de27a32
94ea60c
2529dd4
275f0f0
b8b412d
e2d1769
6c52c01
296c33d
728ee91
2f6c4af
0fa2805
915755c
1e6ef05
01ba8f6
ca2de19
44fbeab
f1d0d4e
7df5087
2e9d923
86755b8
38663b3
ad491f7
b4b943f
ae07743
01fbecc
497aeec
84babb8
c032257
a906ccf
097465c
f3e694b
58ad6fd
40bd7d4
a73f031
1aeafe8
cf91040
86ef249
fe887d3
88f9ed0
5c0a7f9
7c50fcc
6db14df
2517596
33b2d96
6b9d8aa
8049748
089dd2c
2b98c82
13b3d1a
b919316
35f526f
427519e
09cac40
248bbe4
ed61f22
5554804
c7ec9c1
24c40e2
79e3c2b
68759bf
9e7e6ac
75326dd
90c704c
7ed0789
d0b8812
06792f7
581cfe4
2b4e72b
aaf2402
0640b8f
fd05b3c
889321b
c7823e2
7d53553
8dfcd52
f7005c7
2e3a2f9
b5ff159
98cec64
9b9e244
c0caabb
717215d
c8b2e4d
d40dab1
0ac0a29
5572ed4
f37d24e
53a74d2
c9db07d
ac392f3
97e8eab
60363f4
ebc755f
d9e7535
d9ce948
ae8a321
85b63bc
ffd0662
a006f37
e2c4061
2987e57
05d3b00
83d36fe
b05fc1d
41192ee
fbcd4e8
dcb6198
64e049f
19faa6d
e2e1e34
ed1aa5c
c239321
cf1a52f
cb5f096
ee03a58
07f4ec6
3c37e97
5d4912b
d23996c
d519aa6
6d30b66
ce5e5d9
8a0eba3
37838fb
859195b
3e27fd7
f41156d
ceae0ea
3e27d8c
c8010a6
4076a3d
2d2a10d
4ab3286
a3181c8
f648400
96ff187
f688dfc
8e0debb
3ca088d
904c248
1c021e5
2d6d2eb
50e86ea
bd7aee0
d084f09
7b8f1fb
d090294
e99868e
568340e
2e13abc
aa35099
d17b4c9
82f9255
8ba5717
3a5cd9f
a83bc47
8a37ac8
3918db5
186cfe9
987a8ed
ac42cf2
1df3ae1
9336b07
d75340f
dd2ffd3
f25660c
23788f5
748713c
b1078f5
c2d98ba
932e0fd
adfa89b
10e7c42
8a04982
b1b42f8
f8618bd
dc78a3c
4a64ae1
8e4e51a
6fb2a35
9cd0441
657f95b
e935957
22e1b77
85f733b
d764ea4
c3c9954
8646976
e43ecee
3ba69f8
797d107
822c5a3
eb4b4da
0b672f6
f7e687f
b3f9d68
af0cd0b
7b11361
d648e53
5c8424c
c2f8eda
f4759af
0ab8fa1
cfee981
ae5b421
b008d46
02ebc60
f4d7ffc
4c01de2
2270923
add4b4a
aed460c
0318392
5a35b8a
16ddf19
bbbc475
c24b2c8
6c236fc
e1b890c
63d2b0c
47ef899
79aaa6e
e7ad875
37428d2
382d3b5
1da3636
1cffcbf
bbdb21e
53ef016
c6bc3b9
b021016
987baf9
8529d8c
26e3adb
189b2f9
befa9e5
646d95f
2a87165
d9a6765
2fcd503
edcdd92
f4c4083
eabb078
6535a0a
24c0739
d282bb9
333ca47
3bf9c1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
# About us | ||
|
||
Display | Name | Github Profile | Portfolio | ||
--------|:----:|:--------------:|:---------: | ||
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
Display | Name | Github Pofile | Portfolio | ||
--------|:----:|:-------------:|:--------: | ||
|
||
![](https://th.bing.com/th/id/OIP.4gUeSpMg2p-5Of2to-rb3gHaJl?rs=1&pid=ImgDetMain) | Benjamin Lim | [Github](https://github.com/yakultbottle) | [Portfolio](docs/team/yakultbottle.md) | ||
![](https://carrotsandcake.com/wp-content/uploads/2022/07/Among-Us-Symbol.png) | Zhang Yijian | [Github](https://github.com/yijiano) | [Portfolio](docs/team/yijiano.md) | ||
![](https://th.bing.com/th/id/OIP.GMzbuaCd00rCkkcGvd2GiQHaHa?rs=1&pid=ImgDetMain) | Nivedit | [Github](https://github.com/cnivedit) | [Portfolio](docs/team/cnivedit.md) | ||
![](https://th.bing.com/th/id/OIP.uoFjfZw1zxgaKZq6Mn4uJQHaJr?rs=1&pid=ImgDetMain) | Xinchi | [Github](https://github.com/cxc0418) | [Portfolio](docs/team/cxc0418.md) | ||
![](https://th.bing.com/th/id/OIP.FjosDChkMJNJSOVsiUSGlQHaJr?rs=1&pid=ImgDetMain) | Philip | [Github](https://github.com/philip1304) | [Portfolio](docs/team/philip1304.md) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,28 @@ | ||
# Developer Guide | ||
|
||
## Table of Contents | ||
- [Developer Guide](#developer-guide) | ||
- [Table of Contents](#table-of-contents) | ||
- [Acknowledgements](#acknowledgements) | ||
- [Design \& Implementation](#design--implementation) | ||
- [UI and I/O](#ui-and-io) | ||
- [Commands](#commands) | ||
- [Storage](#storage) | ||
- [Item and ItemMap](#item-and-itemmap) | ||
- [DateTime](#datetime) | ||
- [Exceptions and Logging](#exceptions-and-logging) | ||
- [Product scope](#product-scope) | ||
- [Target user profile](#target-user-profile) | ||
- [Value proposition](#value-proposition) | ||
- [User Stories](#user-stories) | ||
- [Non-Functional Requirements](#non-functional-requirements) | ||
- [Glossary](#glossary) | ||
- [Instructions for Testing](#instructions-for-testing) | ||
- [Manual Testing](#manual-testing) | ||
- [JUnit Testing](#junit-testing) | ||
- [Text UI Testing](#text-ui-testing) | ||
- [Future Enhancements](#future-enhancements) | ||
|
||
## Acknowledgements | ||
|
||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | ||
|
@@ -8,6 +31,38 @@ | |
|
||
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
|
||
### UI and I/O | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will it be good to put these implementation into a hierarchy corresponding to your architecture? To make a clearer view of how each component related to the high-level architecture! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should there be more visuals and diagrams to make this clearer? |
||
The program uses a command-line interface (CLI) for interaction with the user. | ||
It receives input as text commands, processes these commands, and provides feedback through the console. | ||
|
||
### Commands | ||
Each user action (e.g. adding, deleting, or editing an item) is mapped to a specific command class. | ||
These classes handle the logic for interpreting the input and calling the appropriate methods from the ItemMap and Storage classes. | ||
|
||
Example: | ||
``` | ||
AddItemCommand command = new AddItemCommand(itemName, quantity, expiryDate); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this can be put in the implementation section, following the example they give us. |
||
command.execute(itemMap, storage); | ||
``` | ||
|
||
### Storage | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think these classes can have UML diagrams |
||
**API**: Storage.java | ||
|
||
Entries are stored in Comma Separated Values(CSV) format. Fields read from left | ||
to right are: **Item type**, **Quantity**, and **Expiry date**(optional). Items | ||
may or may not have an expiry date, but all possess an Item type and a Quantity. | ||
|
||
Example of stored entries: | ||
``` | ||
panadol,1 | ||
panadol,30,2024-08-03 | ||
panadol,20,2024-08-09 | ||
bandage,34 | ||
``` | ||
|
||
The Storage class depends on self-defined classes PillException, Item, and | ||
ItemMap. While it has other dependencies, such as File and FileWriter from | ||
the Java standard library, PillException is the only custom class it depends on. | ||
|
||
## Product scope | ||
### Target user profile | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,154 @@ | ||
# User Guide | ||
|
||
|
||
# Pharmacy Inventory & Logistics Ledger (PILL) User Guide | ||
|
||
**Version 1.0** | ||
|
||
1. [Introduction](#introduction) | ||
2. [Features](#features) | ||
- [Viewing Help: `help`](#viewing-help-help) | ||
- [Adding New Item: `add`](#adding-new-item-add) | ||
- [Listing All Items: `list`](#listing-all-items-list) | ||
- [Deleting Existing Item: `delete`](#deleting-existing-item-delete) | ||
- [Exiting the Program: `exit`](#exiting-the-program-exit) | ||
- [Saving the Data](#saving-the-data) | ||
- [Editing the Data File](#editing-the-data-file) | ||
|
||
## Introduction | ||
|
||
{Give a product intro} | ||
Pharmacy Inventory & Logistics Ledger (PILL) is a Command Line Interface (CLI) tool designed to assist in managing and tracking medicinal inventory. | ||
|
||
|
||
|
||
## Features | ||
|
||
### Viewing Help: `help` | ||
|
||
Displays a list of all available commands and their descriptions. | ||
|
||
**Format**: `help` | ||
|
||
**Sample Output**: | ||
|
||
`> help` | ||
|
||
``` | ||
help | ||
- Displays a list of all available commands and their descriptions | ||
``` | ||
|
||
``` | ||
add n/NAME q/QUANTITY | ||
- Allows the user to add a new item to the inventory | ||
``` | ||
|
||
``` | ||
list | ||
- Shows all the items that have been added to the inventory | ||
``` | ||
|
||
``` | ||
delete INDEX | ||
- Removes a specified item index from the inventory | ||
``` | ||
|
||
``` | ||
exit | ||
- Terminates the application | ||
``` | ||
|
||
|
||
|
||
--- | ||
|
||
### Adding New Item: `add` | ||
|
||
Adds a new item to the inventory, specifying its name and quantity. | ||
|
||
**Format**: `add n/NAME e/QUANTITY` | ||
|
||
**Sample Output**: | ||
|
||
`> add n/Panadol q/2` | ||
|
||
``` | ||
Added the following item to the inventory: | ||
1. Panadol: 2 in stock | ||
``` | ||
|
||
|
||
|
||
--- | ||
|
||
### Listing All Items: `list` | ||
|
||
Displays a list of all items currently stored in the inventory, including their names and quantities. | ||
|
||
**Format**: `list` | ||
|
||
**Sample Output**: | ||
|
||
`> list` | ||
|
||
``` | ||
1. Panadol: 2 in stock | ||
2. Ibuprofen: 1 in stock | ||
``` | ||
|
||
|
||
|
||
--- | ||
|
||
### Deleting Existing Item: `delete` | ||
|
||
Deletes an existing item entry in the inventory. | ||
|
||
**Format**: `delete n/NAME` | ||
|
||
- Delete the items with specified`NAME` . | ||
|
||
**Example**: | ||
|
||
- `delete n/NAME` | ||
deletes the item as referenced in the `list`. | ||
|
||
**Sample Output**: | ||
|
||
`> delete n/Ibuprofen` | ||
|
||
``` | ||
Deleted the following item from the inventory: | ||
2. Ibuprofen: 1 | ||
``` | ||
|
||
|
||
|
||
## Quick Start | ||
--- | ||
|
||
{Give steps to get started quickly} | ||
### Exiting the Program: `exit` | ||
|
||
1. Ensure that you have Java 17 or above installed. | ||
1. Down the latest version of `Duke` from [here](http://link.to/duke). | ||
Exits the program. | ||
|
||
## Features | ||
**Format**: `exit` | ||
|
||
{Give detailed description of each feature} | ||
**Sample Output**: | ||
|
||
### Adding a todo: `todo` | ||
Adds a new item to the list of todo items. | ||
`> exit` | ||
|
||
Format: `todo n/TODO_NAME d/DEADLINE` | ||
`Exiting the inventory interface. Have a nice day! :)` | ||
|
||
* The `DEADLINE` can be in a natural language format. | ||
* The `TODO_NAME` cannot contain punctuation. | ||
|
||
Example of usage: | ||
|
||
`todo n/Write the rest of the User Guide d/next week` | ||
--- | ||
|
||
`todo n/Refactor the User Guide to remove passive voice d/13/04/2020` | ||
### Saving the Data | ||
|
||
## FAQ | ||
The system automatically saves any changes to the inventory to the hard disk after commands that modify the data (e.g., `add`, `delete`). The data is also saved upon using the `exit` command. There is no need to manually save changes. | ||
|
||
**Q**: How do I transfer my data to another computer? | ||
|
||
**A**: {your answer here} | ||
|
||
## Command Summary | ||
--- | ||
|
||
{Give a 'cheat sheet' of commands here} | ||
### Editing the Data File | ||
|
||
* Add todo `todo n/TODO_NAME d/DEADLINE` | ||
Inventory data is stored in a `.csv` file. Users can edit this file manually if necessary. |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package seedu.pill; | ||
|
||
import seedu.pill.util.ItemMap; | ||
import seedu.pill.util.Parser; | ||
import seedu.pill.util.Printer; | ||
import seedu.pill.util.Storage; | ||
import seedu.pill.util.Ui; | ||
import seedu.pill.util.PillLogger; | ||
|
||
import seedu.pill.exceptions.PillException; | ||
|
||
import java.util.logging.Logger; | ||
|
||
public final class Pill { | ||
private static final Storage storage = new Storage(); | ||
private static ItemMap items = new ItemMap(); | ||
private static final Ui ui = new Ui(items); | ||
private static Parser parser = new Parser(items, storage); | ||
private static final Logger logger = PillLogger.getLogger(); | ||
|
||
/** | ||
* Runs the main loop of the Pill chatbot. | ||
*/ | ||
public void run() { | ||
items = storage.loadData(); | ||
Printer.printInitMessage(items, 50); | ||
parser = new Parser(items, storage); | ||
logger.info("New Chatbot Conversation Created"); | ||
while (!parser.getExitFlag()) { | ||
String line = ui.getInput(); | ||
parser.parseCommand(line); | ||
} | ||
Printer.printExitMessage(); | ||
logger.info("Chatbot Conversation Ended"); | ||
} | ||
|
||
/** | ||
* Main method to run the Pill bot. | ||
*/ | ||
public static void main(String[] args) throws PillException{ | ||
new Pill().run(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these links supposed to be here? Should they be broken?