By: Team SE-EDU, W13-4 Since: Aug 2018 Licence: MIT

1. Introduction

BookInventoryLogo

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

  1. Ensure you have Java version 9 or later installed in your Computer.

  2. 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.

    FirstAppPopUp
    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:

    OwnerAccess
    Figure 2. Prompt for Owner if password is correct
    AccountantAccess
    Figure 3. Prompt for Accountant if password is correct
    OtherAccess
    Figure 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. typing help and pressing Enter will open the help window.

    CommandBox
    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

    • addn/Harry Potter i/978-2-12-345680-3 p/60.70 q/100 c/30.90 : adds a book named Harry 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. in add n/NAME, NAME is a parameter which can be used as add n/Harry Potter.

  • Items in square brackets are optional e.g n/NAME [t/TAG] can be used as n/Harry Potter t/cs2113t or as n/Harry Potter.

  • Items with ​ after them can be used multiple times including zero times e.g. [t/TAG]…​ can be used as   (i.e. 0 times), t/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.

BookList
Figure 6. Command Panel

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.

CommandPanel
Figure 7. Command Panel
  • 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.

    command panel result

    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 the Isbn field for sell i/ with the Isbn of the first book in the inventory)
    E.g. sell i/9782123456803

  • sell i/978
    Tab (completes the Isbn field for sell i/978 with the first Isbn of a book that contains 978 in the inventory)
    E.g. sell i/9782123456803

  • sell i/777
    Tab (does not complete the Isbn field as inventory does not contains books with Isbn starting with 777)
    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.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]

  • The search is case insensitive. e.g biology will match Biology

  • The order of the keywords does not matter. e.g. Chemistry Biology will match Biology Chemistry

  • Only the name is searched.

  • Substrings of names will be matched e.g. Chem will match Chemistry

  • Books matching at least one keyword will be returned (i.e. OR search). e.g. Hans Bo will return Hans Gruber, Bo Yang

Example:

  • find Biology
    Returns biology

  • find Biology Chemistry
    Returns any books having names Biology or Chemistry

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 the delete i/978-2-12-345680-3 command)
    redo (reapplies the delete i/978-2-12-345680-3 command)

  • delete i/978-2-12-345680-3
    redo
    The redo command fails as there are no undo commands executed previously.

  • delete i/978-2-12-345680-3
    clear
    undo (reverses the clear command)
    undo (reverses the delete i/978-2-12-345680-3 command)
    redo (reapplies the delete i/978-2-12-345680-3 command)
    redo (reapplies the clear command)

5.7. Requesting for a book : request

Requests to buy a book in the inventory.
Format: request i/ISBN13 e/EMAIL q/QUANTITY

  • Students may indicate interest by requesting an item of a certain ISBN.

    • The email given helps bookstore owners confirm order with the requester. It is up to the owner’s preference to decide whether he/she wishes to accept the request.

    • Possible reasons may include: Item is not a book, item not found in bookstore (Unable to find stock), quantity demanded too high.

    • Note: This app does not have an automatic email response from owner. Thus, it depends on the owner’s personal preference to decide if he/she wishes to reply.

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.

  • ISBN input must be valid. Please refer to an online website to search for the book ISBN.

  • It is necessary for you to provide an email so that the owner can contact you.

  • Quantity input is capped at 999. You are unable to request beyond this amount.

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 (add, delete, stock, sell and clear).

Examples:

  • delete i/978-2-12-345680-3
    list
    undo (reverses the delete i/978-2-12-345680-3 command)

  • check 4
    list
    undo
    The undo command fails as there are no undoable commands executed previously.

  • delete i/978-2-12-345680-3
    clear
    undo (reverses the clear command)
    undo (reverses the delete 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)
  • ISBNs are calculated using a specific mathematical formula and include a check digit to validate the number. Random invalid 10 to 13 digit values will produce an error

  • ISBN field allows input with and without dashes

  • PRICE field is the selling price of the book

  • COST field is the cost price of the book

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

  • QUANTITY only accepts input between 0 and 999, inclusive

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]…​

  • Edits the book at the specified INDEX. The index refers to the index number shown in the displayed book list. The index must be a positive integer 1, 2, 3, …​

  • At least one of the optional fields must be provided.

  • Existing values will be updated to the input values.

  • Quantity Field cannot be an input values. Use stock and sell to change Quantity Field

  • When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative.

  • You can remove all the person’s tags by typing t/ without specifying any tags after it.

Examples:

  • edit 1 p/20 n/Chemistry
    Edits the price and name of the 1st book to be 20 and Chemistry respectively.

  • edit 2 c/30 t/
    Edits the cost of the 2nd book to be 30 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

  • Decrease the quantity at the specified INDEX. The index refers to the index number shown in the displayed inventory list. The index must be a positive integer 1, 2, 3, …​

  • Decrease the quantity of the book with the respective ISBN. ISBN is unique to each book

  • Existing quantity will decrease by the input value.

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

  • Increase the stock at the specified INDEX. The index refers to the index number shown in the displayed inventory list. The index must be a positive integer 1, 2, 3, …​

  • Increase the quantity of the book with the respective ISBN. ISBN is unique to each book. Quantity must be a positive integer 1, 2, 3, …​

  • Existing quantity will be increase by the input value.

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 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 OR delete i/ISBN13
    e.g. delete 1 OR delete 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 OR sell i/ISBN13 q/QUANTITY
    e.g. sell 1 q/8 OR sell i/978-2-12-345680-3 q/8

  • Stock : stock INDEX q/QUANTITY OR stock i/ISBN13 q/QUANTITY
    e.g. stock 1 q/8 OR stock i/978-2-12-345680-3 q/8