By: Team SE-EDU, W13-4
Since: Aug 2018
Licence: MIT
- 1. Introduction
- 2. Getting Started
- 3. Quick Start
- 4. Features
- 5. Commands for Students
- 6. Commands for Bookstore In-house Accountants
- 7. Commands for Bookstore Owners
- 7.1. Adding a book:
add
- 7.2. Clearing all entries :
clear
- 7.3. Check Inventory:
check
- 7.4. Deleting a book :
delete
- 7.5. Deleting a request :
deleterequest
- 7.6. Editing a book :
edit
- 7.7. Decrease Quantity of Book (Number of Books Sold) :
sell
- 7.8. Increase Quantity of Book (Number of Books Ordered):
stock
- 7.9. Toggle request panel :
togglerequests
- 7.1. Adding a book:
- 8. Data Storage
- 9. FAQ
- 10. Command Summary
1. Introduction
BookInventory is catered for students as well as other managerial roles such as bookstore owners and in-house accountants. In BookInventory, bookstore owners can manage and adjust their book supply. In house accountants can check the total revenue and profits for individual books to make better decisions to improve the sales. Lastly, students may access available materials as showcased by the bookstore owners.
BookInventory is optimized for those who prefer to work with Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI). Hope you enjoy!
2. Getting Started
-
Ensure you have Java version
9
or later installed in your Computer. -
Downloading the program.
-
You can download the latest
bookinventory.jar
here -
Copy the file to the folder you want to use as the home folder for your BookInventory.
-
Double-click the file to start the app.
-
3. Quick Start
-
Upon opening the application, you should see the GUI (Graphical User Interface) with the following 'Enter Password' prompt as shown in Figure 1 below, in a few seconds.
Figure 1. Password Prompt -
A password will be required by the application to use it.
-
If you do not know the password, please contact us using github directly.
-
For the sake of this early development of the program, the password for the admin: "owner"; student: "password"; accountant: "accountant".
-
You will have different access to the features, i.e. commands, depending on your role.
-
If you have entered your password correctly, you should see the following prompts:
Figure 2. Prompt for Owner if password is correctFigure 3. Prompt for Accountant if password is correctFigure 4. Prompt for Other Users if password is correct -
Now you are ready to explore BookInventory!
4. Features
In this segment, you will be briefed on what each user interface does.
4.1. Command Box
Input Commands
-
You can simply type the command in the command box as shown in Figure 5. Hit Enter to execute it.
e.g. typinghelp
and pressing Enter will open the help window.Figure 5. Command Box shown in red box -
You may try out the following sample commands:
-
help
: view all commands available -
list
: list all books -
add
n/Harry Potter i/978-2-12-345680-3 p/60.70 q/100 c/30.90
: adds a book namedHarry Potter
to the Inventory List. -
clear
: clears the entire list -
exit
: exits the app
-
4.1.1. Command Format
-
Words in
UPPER_CASE
are the parameters to be supplied by the user e.g. inadd n/NAME
,NAME
is a parameter which can be used asadd n/Harry Potter
. -
Items in square brackets are optional e.g
n/NAME [t/TAG]
can be used asn/Harry Potter t/cs2113t
or asn/Harry Potter
. -
Items with
…
after them can be used multiple times including zero times e.g.[t/TAG]…
can be used ast/friend
,t/friend t/family
etc. -
Items in brackets are required and always private e.g.
q/QUANTITY (c/COST)
-
Items in arrow brackets are commands that are commands available depending on the user e.g. <Owner> means command only usable by Owner.
4.2. Book List
Beginning from the left, you should find a panel of books, each with 4 parameters.
They are TAGS
, books ISBN
, QUANTITY
of books and COST
of book respectively.
These are the available books which the bookstore owners have placed up for display.
. If you are an owner, refer to Section 7, “Commands for Bookstore Owners” to begin managing your book inventory.
4.3. Request List
The middle panel is designed to show Bookstore Owners the requests made by students.
If you are a student, you may minimize this panel as this panel will appear empty to you. Refer to Section 5, “Commands for Students” to find out what you can do in BookInventory.
4.4. Command Panel
This design will come in handy if you are new to BookInventory or a non-tech savvy individual. Simply click on a command and the Command Box will display the command.
-
A command panel is located at the right side of the application. This is suited for beginner users.
-
To select a command, click on any command.
-
A message will pop up on the result display, showing you information and the syntax of the command. A command template will also be given in the command box. You are then required to fill in the remaining fields by following the example given. A screenshot of an example is shown below for your reference.
Note: For advanced users, you are still able to press tab to cycle through the ISBN.
4.4.1. Cycling through existing Isbn: Tab
You can auto-fill the Isbn field with existing ones in the Inventory to save the hassle of having to type the entire Isbn of a book.
Format: Tab
Examples:
-
sell i/
Tab (completes theIsbn
field forsell i/
with the Isbn of the first book in the inventory)
E.g.sell i/9782123456803
-
sell i/978
Tab (completes theIsbn
field forsell i/978
with the first Isbn of a book that contains978
in the inventory)
E.g.sell i/9782123456803
-
sell i/777
Tab (does not complete theIsbn
field as inventory does not contains books with Isbn starting with777
)
E.g.sell i/777
4.5. Full Screen Mode
Hit F11 to toggle between full-screen mode and windowed mode. A full-screen toggle button can also be found under the drop-down menu of the top bar under “Window”.
5. Commands for Students
In this segment, you may find out what commands you can perform in BookInventory. As a student, you are not granted administrative rights.
5.1. Viewing help : help
Format: help
5.2. Exiting the program : exit
Exits the program.
Format: exit
5.3. Locating book by Name: find
Finds books which names contain any of the given keywords from the inventory.
Format: find KEYWORD [MORE KEYWORDS]
Example:
-
find Biology
Returnsbiology
-
find Biology Chemistry
Returns any books having namesBiology
orChemistry
5.4. Listing entered commands : history
Lists all the commands that you have entered in reverse chronological order.
Format: history
Pressing the ↑ and ↓ arrows will display the previous and next input respectively in the command box. |
5.5. Listing all books : list
Shows a list of all books in the inventory list.
Format: list
5.6. Redoing the previously undone command : redo
Reverses the most recent undo
command.
Format: redo
Examples:
-
delete i/978-2-12-345680-3
undo
(reverses thedelete i/978-2-12-345680-3
command)
redo
(reapplies thedelete i/978-2-12-345680-3
command) -
delete i/978-2-12-345680-3
redo
Theredo
command fails as there are noundo
commands executed previously. -
delete i/978-2-12-345680-3
clear
undo
(reverses theclear
command)
undo
(reverses thedelete i/978-2-12-345680-3
command)
redo
(reapplies thedelete i/978-2-12-345680-3
command)
redo
(reapplies theclear
command)
5.7. Requesting for a book : request
Requests to buy a book in the inventory.
Format: request i/ISBN13 e/EMAIL q/QUANTITY
Examples:
-
request i/9780321693624 e/lxh1996@gmail.com q/2
Request for 2 books of book ISBN 9780321693624, with email provided. -
request i/9780205677207 e/krw1998@gmail.com q/21
Request for 21 books of book ISBN 9780205677207, with email provided.
|
5.8. Undoing previous command : undo
Restores the inventory book to the state before the previous undoable command was executed.
Format: undo
Undoable commands: those commands that modify the inventory book’s content ( |
Examples:
-
delete i/978-2-12-345680-3
list
undo
(reverses thedelete i/978-2-12-345680-3
command) -
check 4
list
undo
Theundo
command fails as there are no undoable commands executed previously. -
delete i/978-2-12-345680-3
clear
undo
(reverses theclear
command)
undo
(reverses thedelete i/978-2-12-345680-3
command)
6. Commands for Bookstore In-house Accountants
If you are an accountant, you can access the aforementioned commands as well as the following.
6.1. Display account data : stats
Displays the total revenue made.
Format: stats
7. Commands for Bookstore Owners
If you are a bookstore owner, you are granted access to all available commands in BookInventory. Additional commands below are catered for your convenience.
7.1. Adding a book: add
Adds a book to the inventory list
Format: add n/NAME i/ISBN13 p/PRICE q/QUANTITY (c/COST) [t/TAG]…
A book can have any number of tags (including 0) |
7.2. Clearing all entries : clear
Clears all entries from the BookInventory.
Format: clear
7.3. Check Inventory: check
Finds books with quantity less than or equal to the given input value. List of books displayed in ascending order based on quantity left
Format: check QUANTITY
Example:
-
check 4
Displays list of all books with quantity less than or equal to 4.
7.4. Deleting a book : delete
Deletes the specified book from the inventory list.
Format: delete INDEX
OR delete i/ISBN13
Examples:
-
list
delete 2
Deletes the 2nd book in the displayed list. -
delete i/978-2-12-345680-3
Deletes the book with the corresponding iSBN13 from the inventory list.
7.5. Deleting a request : deleterequest
Deletes the specified request from the request list. Strictly for bookstore owners.
Format: deleterequest INDEX
Examples:
-
deleterequest 2
Deletes the 2nd request in the displayed request list. -
deleterequest 27
Deletes the 27th request in the displayed request list.
7.6. Editing a book : edit
Edits an existing book in the inventory book.
Format: edit INDEX [n/NAME] [i/ISBN] [p/PRICE] [c/COST] [t/TAG]…
Examples:
-
edit 1 p/20 n/Chemistry
Edits the price and name of the 1st book to be20
andChemistry
respectively. -
edit 2 c/30 t/
Edits the cost of the 2nd book to be30
and clears all existing tags.
7.7. Decrease Quantity of Book (Number of Books Sold) : sell
Decrease the quantity of an existing book in the inventory list.
Format: sell INDEX q/QUANTITY
OR sell i/ISBN13 q/QUANTITY
Examples:
-
list
sell 1 q/5
Decrease the quantity available of the 1st book by 5. -
sell i/978-2-12-345680-3 q/4
Decrease the quantity available for the book with the corresponding ISBN13 by 4.
7.8. Increase Quantity of Book (Number of Books Ordered): stock
Increase the quantity of an existing book in the inventory list.
Format: stock INDEX q/QUANTITY
OR stock i/ISBN13 q/QUANTITY
Examples:
-
list
stock 2 q/6
Increase the quantity available of the 2nd book by 6. -
stock i/978-2-12-345680-3 q/5
Increase the quantity available for the book with the corresponding ISBN13 by 5. Examples: -
add n/Harry Potter i/9781408855713 p/60.70 q/100 c/30.90 t/difficult
-
add n/Lord of the Rings i/9789655171990 p/59.90 q/271 c/20.99
7.9. Toggle request panel : togglerequests
Toggle the request panel. When toggled off, requests are hidden and request panel can be minimized. Strictly for bookstore owners.
Format: togglerequests
8. Data Storage
8.1. Saving the data
BookInventory data are saved in the hard disk automatically after any command that changes the data.
There is no need to save manually.
8.2. Encrypting data files [coming in v2.0]
{explain how the user can enable/disable data encryption}
9. FAQ
Q: How do I transfer my data to another Computer?
A: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Inventory Book folder.
Q: How to install Java?
A: Visit https://docs.oracle.com/javase/10/install/overview-jdk-10-and-jre-10-installation.html for more information
Q: How do I get the latest version?
A: Watch us on github [https://github.com/CS2113-AY1819S1-W13-4] to get the latest updates
10. Command Summary
10.1. Commands for Students
-
Help :
help
-
Exit :
exit
-
Find :
find KEYWORD [MORE_KEYWORDS]
e.g.find biology chemistry
-
List :
list
-
History :
history
-
Redo :
redo
-
Request :
request i/ISBN13 e/EMAIL q/QUANTITY
e.g.request i/978-2-12-345680-3 e/johnd@gmail.com q/5
-
Undo :
undo
10.2. Additional Commands for Accountants
-
Display Statistics :
stats
10.3. Additional Commands for Owners
-
Add :
add n/NAME i/ISBN13 p/PRICE q/QUANTITY (c/COST) [t/TAG]…
e.g.add n/Harry Potter i/978-2-12-345680-3 p/60.70 q/100 c/90 t/difficult
-
Check :
check QUANTITY
e.g.check 4
-
Clear :
clear
-
Delete :
delete INDEX
ORdelete i/ISBN13
e.g.delete 1
ORdelete i/978-2-12-345680-3
-
DeleteRequest :
deleterequest INDEX
e.g.deleterequest 1
-
Edit :
edit INDEX n/NAME i/ISBN13 p/PRICE c/COST [t/TAG]…
e.g.edit INDEX n/Chemistry p/30.00
-
Sell :
sell INDEX q/QUANTITY
ORsell i/ISBN13 q/QUANTITY
e.g.sell 1 q/8
ORsell i/978-2-12-345680-3 q/8
-
Stock :
stock INDEX q/QUANTITY
ORstock i/ISBN13 q/QUANTITY
e.g.stock 1 q/8
ORstock i/978-2-12-345680-3 q/8