Developer Guide

Table of Contents


1.0 Introduction

Welcome to Quotesify!

Quotesify is a free desktop application to help you in your reading activities. With Quotesify, you can add books and its related quotes that you wish to remember. You can categorize your books and quotes by an author, customize categories, and even rate your books. Quotesify also comes with a progress tracker which improves your reading experience.

This guide will provide information on the design and implementation of Quotesify. It will help you to get started on your journey of being a contributor to Quotesify. This guide will also explain the steps to test out the program, so that you will have a better understanding of the current status of Quotesify.


2.0 Setting up

  1. Fork the Quotesify repo from here, and clone the fork to your computer.
  2. Open up your IDE (IntelliJ is highly recommended). If you are not at the welcome screen, click File > Close Project to close any existing project.
  3. Set up the correct JDK version for Gradle:
    1. Click Configure > Project Defaults > Project Structure.
    2. Click New… and find the directory where you saved your JDK.
  4. Click Import Project.
  5. Locate the build.gradle file and select it.
  6. Click OK.
  7. Click Open as Project.
  8. Click OK to accept all default settings.
  9. To verify the set up, locate the Quotesify.java file, right-click it and select Run Quotesify.main(). If the setup is correct, you should see something like this as shown below:
________                __                .__  _____       
\_____  \  __ __  _____/  |_  ____   _____|__|/ ____\__.__.
 /  / \  \|  |  \/  _ \   __\/ __ \ /  ___/  \   __<   |  |
/   \_/.  \  |  (  <_> )  | \  ___/ \___ \|  ||  |  \___  |
\_____\ \_/____/ \____/|__|  \___  >____  >__||__|  / ____|
       \__>                      \/     \/          \/    
Welcome to Quotesify v2.1!
Before you continue, here's something:
Better days are coming, they are called Saturday and Sunday.
----------------------------------------------------------------

What would you like to do with Quotesify?

Note: If you have added a quote before, the quote printed will be randomized.


3.0 Design

Note: All UML diagrams in this guide are stored in the docs/images directory.

3.1 Architecture

Architecture Diagram

The architecture diagram displayed above describes the high-level design of Quotesify. Below details a brief description of each component shown.


Main class: Quotesify.java

The other components that make up Quotesify include:

The Sequence Diagram below shows an example of how the components work together upon receiving the command add -b Harry Potter /by JK Rowling.

Sequence Diagram for Components


3.2 UI Component

The class diagram below shows the associations between classes that make up the UI component.

Class Diagram for UI Component

The UI component is made up of mainly 2 classes:

In essence, the UI is responsible for the majority of the display of all successful command executions, error messages , as well as user interactions by prompting for the next command.


3.3 Logic Component

The class diagram below shows the associations between classes that make up the Logic component.

Note: Model and Storage in this diagram represent components, not classes.

Class Diagram for Logic Component

The Logic component is made up of 2 sub-components, namely the Parser and Command. Below describes the sequence flow from the time a user input is read till command execution ends.

  1. UI fetches the User input, which is passed into the Parser for parsing.
  2. Parser returns a Command object, which is then executed.
  3. The command execution outcome may affect Quotesify’s model objects. (e.g. adding a book)
  4. Command instructs the UI component to print out relevant output messages depending on command type. Also, Command may invoke saving of data via Storage at a given point in time.
  5. Finally, Command will then inspect the exit status after command execution to verify if the program should exit.
  6. Control is handed back over to the UI, either for processing of program exit, or the next user input command.

Therefore,


3.4 Model Component

The class diagram below shows the associations between classes that make up the Model component.

Class Diagram for Model Component

The model component consists of several classes that make up the main features of Quotesify. Each object holds in-application data unique to each feature and is stored in a list of their own.


3.5 Storage Component

The storage component consists of a single Storage class. It is responsible for saving user data as instructed by the command component as well as to detect and load data on program launch.

On program launch:

  1. Storage is initialised and checks for the existence of save data.
  2. If save data exists, Storage will read the save data in JSON format and parses them back into their model objects (e.g. Book).
  3. If save data does not exist, Storage will create an empty save file in the specified directory.

On Command execution:

  1. Storage parses all model objects in JSON format and writes into the save file.

4.0 Implementation

Note: All UML diagrams in this guide are stored in the docs/images directory.

4.1 Feature: Book Management

Given below is the class diagram for classes related to Book Management in Quotesify:

Class Diagram for Book Management

The sequence diagram below demonstrates the command execution process when adding a book to the booklist.

Sequence Diagram for Add Books

Design Considerations

4.1.2 Find Book by Keyword

The sequence diagram below demonstrates the command execution process when finding books by a keyword.

Sequence Diagram for Find Book by Keyword

Design Considerations

4.2 Feature: Quote Management

Given below is the class diagram for classes related to the Quote Management System in Quotesify:

Class Diagram for Quote Management System

A Quote object holds the following attributes:

4.2.1 Add quote

The add quote feature allows users to add quotes of multiple formats to Quotesify. Quotes added can be of the following format:

The sequence diagram below reflects the command execution when a user adds a quote to Quotesify.

Sequence Diagram for Add Quotes

Design Considerations

4.2.2 Edit Quote Reflection

The edit quote reflection feature updates current reflection of a quote into a new reflection, keeping the remaining information such as quote, author name and reference the same.

The sequence diagram below reflects the command execution when a user edits the reflection of a quote.

Sequence Diagram for Edit Quotes Reflection

Design Considerations


4.3 Feature: Progress Tracker

Progress Tracker consists of two parts: Bookmark Management and Task Management. Given below is the class diagram for classes related to Bookmark Management in Quotesify:

Class Diagram for Bookmark Management

Given below is the class diagram for classes related to Task Management in Quotesify:

Class Diagram for Task Management

4.3.1 Add/Update bookmark

The proposed add or update bookmark feature will rely on an existing Book object, and then a Bookmark object will be created in the process.

The sequence diagram below demonstrates the command execution process when adding or updating a bookmark to an existing book.

Sequence Diagram for Add Bookmark

Design Considerations

4.3.2 Add task

The add task feature allows users to add tasks with a deadline to Quotesify. Tasks added can be of the following format:

The sequence diagram below demonstrates the command execution process when adding a task.

Sequence Diagram for Add ToDo

Design Considerations


4.4 Feature: Category Management

Given below is the class diagram for classes related to Category Management in Quotesify:

Class Diagram for Category Management

A Category object holds the following attributes:

4.4.1 Add Categories

The proposed add categories feature allows users to add multiple categories to an existing book, quote, or both.

The sequence diagram below demonstrates the command execution process when adding a category to an existing book.

Sequence Diagram for Add Categories

Design Consideration

With the addition of new categories, users can perform several commands that makes use of them. Such as editing of category name, finding a category, deleting a category, listing all categories, or adding the same category to other books and quotes.


4.5 Feature: Rating system for books

Given below is the class diagram for classes related to the Rating System in Quotesify:

Class Diagram for Rating system

4.5.1 Add rating

The add rating feature will rely on an existing book object, and a rating object will then be created in the process.

Given below is the sequence diagram for adding rating to a book:

Sequence Diagram for Add Ratings

Design Consideration

4.5.2 Find ratings

The find ratings feature will search for books with title that contains the specified keyword and print details about the rating.

Given below is the sequence diagram for finding ratings:

Sequence Diagram for Find Ratings


Appendix A: Product Scope

Target user profile

The intended user of Quotesify is someone who meets the following criteria:

Value proposition


Appendix B: User Stories

Version As a … I want to … So that I …
v1.0 reader enter good quotes and phrases from a book I read can quickly refer back to it at any time
v1.0 user categorize my listings can view quotes from a specific category that I want
v1.0 long time user have a page to see a list of books and categories of my notes can navigate into the relevant book/category without having to remember the titles
v1.0 user give rating for the books I read can recommend book titles to others when asked
v1.0 beginner reader add deadlines to books I am reading can keep track of my readling deadlines
v1.0 avid reader be able to keep track of books can filter out books I have read and those that are on my list of books to read
v1.0 forgetful user add bookmarks to my book can find the page where I last stopped
v1.0 user categorise my books or quotes can view items from a specific category whenever I need
v1.0 user save quotes I find meaningful can view my favourite quotes whenever I want
v2.0 forgetful reader be reminded of quotes I saved can remember them better in the long run
v2.0 student and reader pen my thoughts to a highlighted quote or text can expand on certain ideas or express how I feel
v2.0 long time user be able to search for keywords can find specific quotes I want from the list
v2.0 user after some time find a book rating by its book title do not have to go through the whole list

Appendix C: Non-Functional Requirements

  1. Should work on major Operating Systems (OS) with at least Java 11 installed.
  2. A user should have no problems using the various commands without referring to the help page after some time.
  3. Users should prefer typing to GUI.
  4. Data should be stored locally inside the device’s hard disk.
  5. Data should be in a human editable text file.
  6. Program should work without requiring an installer and/or remote server.

Appendix D: Glossary


Appendix E: Instructions for Manual Testing

Launch and shutdown

Initial launch

  1. Ensure Java 11 and above is installed.
  2. Download the latest Quotesify JAR file from here.
  3. Save the jar file in a desired file directory.
  4. Open your command line or terminal and navigate into the file directory where Quotesify is saved.
  5. Run java -jar [CS2113T-T09-3][Quotesify].jar to launch Quotesify.

Subsequent launch

  1. Open your command line or terminal and navigate into the file directory where Quotesify is saved.
  2. Run java -jar [CS2113T-T09-3][Quotesify].jar to launch Quotesify.
  3. Data will be automatically loaded from the data file upon launch.

Shutdown

  1. To terminate Quotesify, enter the bye command. You should see the following:
  2. Data will be automatically saved into a data file.
---------------------------------------------------------------
Before you continue, here's something:
Better days are coming, they are called Saturday and Sunday.
Alright, have a nice day!
---------------------------------------------------------------

Note: If you have added a quote before, the quote printed will be randomized.


Testing for Book Management

Adding a book

  1. Test case: add -b Harry Potter /by JK Rowling

    Expected: Book is added to Quotesify’s booklist. A message will be prompted to indicate that the book has been successfully added.

  2. Other incorrect commands to try:

    • add -b: Book title left empty
    • add -b /by JK Rowling: Book title left empty with author name specified
    • add -b title: Author name left empty
    • add -b title /by: Author name left empty with author tag specified

    Expected: Book will not be added. An error message will be printed.

List all existing books

  1. Test case: list -b

    Expected: All existing books in booklist will be listed.

List book details

  1. Test case: list -b 2

    Expected: Book details of book with the book index 2 from list of all books will be printed.

  2. Other incorrect commands to try:

    • list -b Harry Potter /by JK Rowling: Wrong format.
    • list -b 10000: Index out of range of booklist.

    Expected: Book details will not be printed. An error message will be printed.

List books by author

  1. Test case: list -b /by JK Rowling

    Expected: Books with the author JK Rowling will be listed.

  2. Other incorrect commands to try:

    • list -b JK Rowling: Flag /by not specified

    Expected: Books will not be listed. An error message will be printed.

Find books by keyword

  1. Test case: find -b Harry

    Expected: Books with the title or author name containing Harry will be listed.

  2. Other incorrect commands to try:

    • find -b: Keyword not specified

    Expected: Books will not be listed. An error message will be printed.

Delete books

  1. Test case: delete -b 3

    Expected: Book with the book index of 3 in booklist will be deleted from list. A successful message will be printed.

  2. Other incorrect commands to try:

    • delete -b Harry Potter: Wrong format
    • delete -b 10000: Index out of range of booklist.

    Expected: Book will not be deleted. An error message will be printed.

Edit book

  1. Test case: edit -b 3 /to Harry Potterrrrr

    Expected: Book title of book with the book index of 3 will be changed to Harry Potterrrrr.

  2. Other incorrect commands to try:

    • edit -b Harry Potter /to Harry Potterrrrr: Wrong format
    • edit -b 3 Harry Potterrrrr: Flag /to not specified.
    • edit -b 3 /to: New title not specified.

    Expected: Book title will not be edited. An error message will be printed.


Testing for Quote Management

Adding a quote

  1. Add a quote without author and reference title to Quotesify

    • Test case: add -q Life is short, smile while you still have teeth

    • Expected: Quote is added to Quotesify. A message will be prompted to indicate that the quote has been successfully added.

  2. Add a quote with an author to Quotesify

    • Test case: add -q Luke, I am your father /by Darth Vader

    • Expected: Quote is added to Quotesify. A message will be prompted to indicate that the quote has been successfully added.

  3. Add a quote with a reference title to Quotesify

    • Test case:add -q Get schwifty! /from Rick and Morty

    • Expected: Quote is added to Quotesify. A message will be prompted to indicate that the quote has been successfully added.

  4. Add a quote with an author and reference title to Quotesify

    • Test case: add -q So everyone’s supposed to sleep every single night now? /by Rick /from Rick and Morty

    • Expected: Quote is added to Quotesify. A message will be prompted to indicate that the quote has been successfully added.

  5. Other incorrect commands to try:

    • add -q : quote field left empty
    • add -q : empty space entered for quote field
    • add -q you can't see me /by : author tag with missing author name
    • add -q my name is inigo montoya /from : reference tag with missing reference title
    • add -q i am your father /by /from : missing reference title and author name

    Expected: Quote will not be added. A message with error details will be shown.

Listing all quotes

  1. Test case: list -q

    Expected: The entire list of quotes with reference and author name (if present) in Quotesify will be displayed.

Listing quotes from a specific reference

  1. Test case: list -q /from rick and morty

    Expected: The list of quotes with the specified reference title will be displayed.

  2. Other incorrect commands to try:

    • list -q /from : reference tag with missing reference title

    Expected: No quotes will be listed. A message with error details will be shown.

Listing quotes by a specific author

  1. Test case: list -q /by darth vader

    Expected: The list of quotes with the specified author name will be displayed.

  2. Other incorrect commands to try:

    • list -q /by : author tag with missing author name

    Expected: No quotes will be listed. A message with error details will be shown.

Listing quotes from a specific author and reference

  1. Test case: list -q /by rick /from rick and morty

    Expected: The list of quotes with the specified author name and reference title will be displayed.

  2. Other incorrect commands to try:

    • list -q /by /from rick and morty : author and reference tag with missing author name
    • list -q /by rick /from : author and reference tag with missing reference title
    • list -q /by /from : missing author name and reference title

    Expected: No quotes will be listed. A message with error details will be shown.

Editing a quote

  1. Test case: edit -q 2 /to No, I am your mummy /by Darth Vader

    Expected: Quote will be updated, a prompt displaying old and updated quote will be displayed.

  2. Other incorrect commands to try:

    • edit -q : missing quote number and updated quote
    • edit -q 1 /to: missing updated quote
    • edit -q 1 You can't see me : missing “/to” flag
    • edit -q 9999999 /to You can't see me : non-existent quote number

    Expected: Quote will not be updated. A message with error details will be shown.

Deleting a quote

  1. Test case: delete -q 1

    Expected: Quote will be deleted from Quotesify. A message will be prompted to indicate that the quote has been successfully deleted.

  2. Other incorrect commands to try:

    • delete -q: missing quote number field
    • delete -q X: non integer input
    • delete -q 9999999: non existent quote number

    Expected: Quote will not be deleted. A message with error details will be shown.

Finding a quote

  1. Test case: find -q sleep

    Expected: Quotes related to the keyword will be shown.

  2. Other incorrect commands to try:

    • find -q: missing keyword
    • find -q : empty space as keyword

    Expected: No quotes will be found and listed. A message with error details will be shown.

Adding reflection to a quote

  1. Test case: add -qr 1 /reflect No, that's not true. It's impossible!

    Expected: Reflection is added to quote. A message will be prompted to indicate that the reflection has been successfully added.

    • Quotes with reflection will have a “[R]” tag attached to differentiate between those that do not.
  2. Incorrect commands to try:

    • add -qr : missing quote number, reflection tag and reflection
    • add -qr 1 /reflect : reflection field missing
    • add -qr 9999 /reflect Reflection is here : non-existent quote

    Expected: Reflection will not be added. A message with error details will be shown.

Listing reflection of a quote

  1. Test case: list -qr 1

    Expected: The reflection attached to the specified quote will be displayed.

  2. Other incorrect commands to try:

    • list -qr : missing quote number
    • list -qr 9999 : non-existent quote

    Expected: Reflection will not be listed. A message with error details will be shown.

Editing reflection of a quote

  1. Test case: edit -qr 1 /to Who is Yoda’s daddy?

    Expected: Reflection will be updated, a prompt displaying updated reflection will be shown.

  2. Other incorrect commands to try:

    • edit -qr 1 /to: missing updated reflection
    • edit -qr 1 nothing to reflect : missing /to flag
    • edit -qr 9999999 /to updated reflection here! : non-existent quote number

    Expected: Reflection will not be updated. A message with error details will be shown.

Deleting reflection of a quote

  1. Test case: delete -qr 1

    Expected: Reflection will be deleted from the quote. A message will be prompted to indicate that the reflection has been successfully deleted.

  2. Other incorrect commands to try:

    • delete -qr: missing quote number field
    • delete -qr X: non integer input
    • delete -qr 9999999: non existent quote number

    Expected: Quote reflection will not be deleted. A message with error details will be shown.


Testing for Progress Tracker

Adding a bookmark to book

  1. Test case: bookmark -b 1 /pg 123

    Expected: a page number will be marked at the book. A message will be prompted to indicate that the bookmark has been tagged to the book successfully.

  2. Other incorrect commands to try:

    • bookmark -b 1 /pg: missing page number field
    • bookmark -b 0 /pg 123: incorrect book number input

    Expected: Bookmark will not be added to any book. A message will error details will be shown.

List all existing bookmarks

  1. Test case: list -bm

    Expected: A list of bookmarks will be displayed. Each row contains an index assigned to the bookmark in the list, its book’s information, and a page number marked by the bookmark.

Deleting an existing bookmark

  1. Test case: delete -bm 1

    Expected: Bookmark will be deleted from the book. A message will be prompted to indicate that the bookmark has been removed from the book successfully.

  2. Other incorrect commands to try:

    • delete -bm 999 : bookmark number with given index does not exist
    • delete -bm abc : invalid bookmark number provided

    Expected: Bookmark will not be deleted from the book. A message with error details will be shown.

Edit an existing bookmark

  1. Test case: bookmark -b 1 /pg 123

    Expected: The page number will be updated in the bookmark. A message will be prompted to indicate that the bookmark has been updated successfully.

  2. Other incorrect commands to try:

    • bookmark -b 1 /pg: missing page number field
    • bookmark -b 0 /pg 123: incorrect book number input

    Expected: Bookmark will not be updated to any book. A message with error details will be shown.

Adding a task to todo list

  1. Adding a task without deadline
    • Test case: add -t return Harry Potter

      Expected: A message will be prompted to indicate that the task has been added to the todo list successfully, and the deadline is ‘not specified’.

  2. Adding a task with unformatted deadline
    • Test case: add -t return Harry Potter /by tmr

      Expected: A message will be prompted to indicate that the task has been added to the todo list successfully, and the deadline is the same as stated in the command line.

  3. Adding a task with formatted deadline
    • Test case: add -t return Harry Potter /by 2020-10-24

      Expected: A message will be prompted to indicate that the task has been added to the todo list successfully, and the deadline will be formatted as ‘Oct 24 2020, Saturday’.

Listing all existing tasks

  1. Test case: list -t

    Expected: A list of tasks will be displayed. The tasks with formatted deadlines will be displayed in the front, and sorted in ascending order of timing, while other tasks will be displayed at the back without any order.

Marking an existing task as done

  1. Test case: done -t 1

    Expected: A message will be prompted to indicate that the task has been marked as done in the todo list successfully.

Deleting an existing task

  1. Test case: delete -t 1

    Expected: A message will be prompted to indicate that the task has been removed from the todo list successfully.


Testing for Category Management

Adding categories

  1. Add one or more category to a book
    • Prerequisites: A book should exist in Quotesify.
    • Assume that the book “Harry Potter” is added into Quotesify assigned to index 1.
    • Test case: add -c fantasy -b 1

      Expected: A message will be prompted to indicate that category has been tagged to the book successfully.

    • Test case: add -c fantasy romance -b 1

      Expected: A message will be prompted to indicate that categories have been tagged to the book successfully.

  2. Add one or more category to a quote
    • Prerequisites: A quote should exist in Quotesify.
    • Assume that the quote “Life is great!” is added into Quotesify assigned to index 1.
    • Test case: add -c inspirational -q 1

      Expected: A message will be prompted to indicate that category has been tagged to the quote successfully.

    • Test case: add -c inspirational happy -q 1

      Expected: A message will be prompted to indicate that categories have been tagged to the quote successfully.

  3. Add one or more category to a book and quote
    • Prerequisites: A book and quote should exist in Quotesify.
    • Assume that an existing book and quote are both assigned to index 1.
    • Test case: add -c inspirational -b 1 -q 1

      Expected: A message will be prompted to indicate that category has been tagged to both book and quote successfully.

    • Test case: add -c inspirational action -q 1

      Expected: A message will be prompted to indicate that categories have been tagged to both book and quote successfully.

  4. Other incorrect commands to try
    • add -c missing category name, book or quote
    • add -c action missing a book or quote
    • add -c action -b 0 -q 0 invalid book and quote index
    • add -c -b 1 -q 1 missing category name

    Expected: An error message will be prompted. No changes will be made.

Listing all categories

  1. List all existing categories
    • Test case: list -c

      Expected: A list of categories with the total number of items tagged under each category will be displayed.

Listing a specific category

  1. List all books and quotes tagged by a specific category
    • Test case: list -c action

      Expected: A list of books and quotes tagged under that category will be displayed.

  2. Incorrect commands to try
    • list -c 123 invalid category name

    Expected: An error message will be displayed indicating that no such category exists.

Deleting existing categories

  1. Remove one or more category from a book
    • Prerequisites: Specified book index, quote index and category should exist in Quotesify.
    • Assume the book “Harry Potter” is tagged with [action, fantasy] category and assigned with index 1.
    • Test case: delete -c action -b 1

      Expected: A message will be prompted to indicate that category has been removed from book successfully.

    • Test case: delete -c action fantasy -b 1

      Expected: A message will be prompted to indicate that categories have been removed from book successfully.

  2. Remove one or more category from a quote
    • Prerequisites: Specified book index, quote index and category should exist in Quotesify.
    • Assume the quote “Life is great!” is tagged with [inspirational, happy] category and assigned with index 1.
    • Test case: delete -c inspirational -q 1

      Expected: A message will be prompted to indicate that category has been removed from quote successfully.

    • Test case: delete -c inspirational happy -q 1

      Expected: A message will be prompted to indicate that categories have been removed from quote successfully.

  3. Remove one or more category from a book and quote
    • Prerequisites: Specified book index, quote index and category should exist in Quotesify.
    • Assume that a book and quote are both tagged with [action, happy] categories.
    • Test case: delete -c action -b 1 -q 1

      Expected: A message will be prompted to indicate that category has been removed from both book and quote successfully.

    • Test case: delete -c action happy -b 1 -q 1

      Expected: A message will be prompted to indicate that categories have been removed from both book and quote successfully.

  4. Remove one or more category from list
    • Test case: delete -c action

    Expected: A message will be prompted to indicate that category has been removed from all book and quotes.

    • Test case: delete -c action fantasy

    Expected: A message will be prompted to indicate that categories has been removed from all book and quotes.

  5. Other incorrect commands to try
    • delete -c missing category name, book or quote
    • delete -c action -b 0 -q 0 invalid book and quote index
    • delete -c -b 1 -q 1 missing category name

    Expected: An error message will be prompted. No changes will be made.

Editing an existing category

  1. Edit an existing category name
    • Test case: edit -c love /to romance

      Expected: A message will be prompted indicating that category has been changed successfully. All books and quotes tagged under the old category will be changed as well.

  2. Other incorrect commands to try
    • edit -c missing existing and new category name
    • edit -c love missing new category name

    Expected: An error message indicating invalid parameters and a command usage will be prompted. No changes will be made.

Finding an existing category

  1. Find existing categories related to a keyword.
    • Test case: find -c man

      Expected: Quotesify will list all categories containing the keyword “man”.

  2. Other incorrect commands to try
    • find -c missing keyword
    • find -c 123 invalid category name

    Expected: An error message will be prompted. No categories will be listed.


Testing for Rating System for books

Adding a book rating

  1. Prerequisite: Book to be rated should exist in Quotesify. Use list -b to list all existing books and get book number.

  2. Test case: add -r 5 1, assuming book number 1 exists.

    Expected: Rating is added to the book. A message will be prompted to indicate rating has been added successfully.

  3. Other incorrect commands to try:

    • add -r: rating score and/or book number fields left empty
    • add -r 6 1: assuming book number 1 exists, but rating score is out of the range
    • add -r 1 x: where x is a book number that does not exist

    Expected: No rating is added. A message with error details will be prompted.

Listing all existing book ratings

  1. Test case: list -r

    Expected: The entire list of books and their ratings will be shown. Rating of books are sorted in descending order, with the highest rating at the top.

Listing books of a specific book rating

  1. Test case: list -r 5

    Expected: The list of books with the specified rating will be shown.

  2. Other incorrect commands to try:

    • list -r 6: rating score is out of the range
    • list -r AAA: invalid rating score

    Expected: No rating is listed. A message with error details will be prompted.

Deleting a book rating

  1. Prerequisite: Book to be rated should exist in Quotesify. Use list -b to list all existing books and get book number.

  2. Test case: delete -r 1, assuming book number 1 exists.

    Expected: Rating is deleted from book. A message will be prompted to indicate rating has been deleted successfully.

  3. Other incorrect commands to try:

    • delete -r: book number field left empty
    • delete -r x: where x is a book number that does not exist or has not been rated

    Expected: No rating is deleted. A message with error details will be prompted.

Editing a book rating

  1. Prerequisite: Book to be rated should exist in Quotesify. Use list -b to list all existing books and get book number.

  2. Test case: edit -r 4 1, assuming book number 1 exists.

    Expected: Rating is edited to the new rating. A message will be prompted to indicate rating has been edited successfully.

  3. Other incorrect commands to try:

    • edit -r: rating score and/or book number fields left empty
    • edit -r -1 1: assuming book number 1 exists, but rating score is out of the range
    • edit -r 3 x: where x is a book number that does not exist or has not been rated

    Expected: No rating is edited. A message with error details will be prompted.

Finding book ratings

  1. Test case: find -r POT

    Expected: Ratings of books with title that contains the keyword (case-insensitive) will be listed.

  2. Other incorrect commands to try:

    • find -r: keyword field left empty

    Expected: No rating is found and listed. A message with error details will be prompted.