Developer Guide
Welcome to FABook!
FABook is a dependable assistant for financial advisers by reminding them of meetings and consolidating crucial information like financial plans and client information right at their fingertips!
Financial advisers now focus on giving their full attention to their clients without having to worry about things slipping their mind.
FABook is optimized for a one-stop storage solution to store and remind them on everything they need to know about their client.
What is this guide for?
This developer guide is intended for readers to understand the inner workings of how FABook works and the design process behind different implementations of features. This guide will go into detail about the architecture used to build FABook as well as several notable features.
Who is this guide for?
The intended target audience of this guide is for
- Developers looking to morph or evolve FABook for different or improved uses
- Developers looking to understand the architecture and follow the design to build the system
- Maintainers who are looking to understand how the system was built in order to be able to perform any enhancement or reengineering work.
How to use this guide?
Recommended prerequisites
To fully utilise and understand this guide, you should have knowledge and expertise in the following:
- Java
- UML diagrams
Organization
The guide provides a top-down view of the system by first providing an overview of the entire system before looking in greater detail of each component of the architecture. Afterwards, it talks about notable implementations within the components. Details mentioned may include:
- Implementation
- Example Usage
- Design
- Design Considerations
- Related Features
You may refer to the table of contents below to quick jump to any particular section.
Legend
- Text in blue are hyperlinks that direct you to the relevant section of the page or to other websites
- Text in bold are used to emphasize important details to look out for or to distinguish headers from the rest of the text
- Text in
code snippets such as this
are used to show program or code related or used in FABook


Table of Contents
- Welcome to FABook!
- Table of Contents
- Acknowledgements
- Setting up, getting started
- Design
- Implementation
- Documentation, logging, testing, configuration, dev-ops
- Appendix: Requirements
-
Appendix: Instructions for manual testing
- Launch and shutdown
- Creating a person
- Assigning a PDF file to a person
- Finding a person by name
- Finding a person by number
- Finding a person by address
- Finding persons by tag
- Opening PDF file
- Get upcoming meetings
- Update client information:
- Update descriptions:
- Update meetings:
- Deleting a person
- Delete Meetings
- Remove past meetings
- Undoing a previous command
- Saving data
- Appendix: Effort
Acknowledgements
- FABook is built upon AddressBook Level-3 as a foundation
- The feature Undo and Redo was reused with minimal changes from a Tutorial called Implementing Undo and Redo With The Command Design Pattern by ArjanCode.
- The feature open and add PDF file was reused with minimal changes from a code from stackoverflow Open PDF file on the fly
Setting up, getting started
Refer to the guide Setting up and getting started.
Design

.puml
files used to create diagrams in this document can be found in the diagrams folder. Refer to the PlantUML Tutorial at se-edu/guides to learn how to create and edit diagrams.
Architecture
The Architecture Diagram given above explains the high-level design of the App.
Given below is a quick overview of main components and how they interact with each other.
Main components of the architecture
Main
has two classes called Main
and MainApp
. It is responsible for,
- At app launch: Initializes the components in the correct sequence, and connects them up with each other.
- At shut down: Shuts down the components and invokes cleanup methods where necessary.
Commons
represents a collection of classes used by multiple other components.
The rest of the App consists of four components.
-
UI
: The UI of the App. -
Logic
: The command executor. -
Model
: Holds the data of the App in memory. -
Storage
: Reads data from, and writes data to, the hard disk.
How the architecture components interact with each other
The Sequence Diagram below shows how the components interact with each other for the scenario where the user issues the command delete 1
.
Each of the four main components (also shown in the diagram above),
- defines its API in an
interface
with the same name as the Component. - implements its functionality using a concrete
{Component Name}Manager
class (which follows the corresponding APIinterface
mentioned in the previous point.
For example, the Logic
component defines its API in the Logic.java
interface and implements its functionality using the LogicManager.java
class which follows the Logic
interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component’s being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.
The sections below give more details of each component.
UI component
The API of this component is specified in Ui.java
The UI consists of a MainWindow
that is made up of parts e.g.CommandBox
, ResultDisplay
, PersonListPanel
, StatusBarFooter
etc. All these, including the MainWindow
, inherit from the abstract UiPart
class which captures the commonalities between classes that represent parts of the visible GUI.
The UI
component uses the JavaFx UI framework. The layout of these UI parts are defined in matching .fxml
files that are in the src/main/resources/view
folder. For example, the layout of the MainWindow
is specified in MainWindow.fxml
The UI
component,
- executes user commands using the
Logic
component. - listens for changes to
Model
data so that the UI can be updated with the modified data. - keeps a reference to the
Logic
component, because theUI
relies on theLogic
to execute commands. - depends on some classes in the
Model
component, as it displaysPerson
object residing in theModel
.
Logic component
API : Logic.java
Here’s a (partial) class diagram of the Logic
component:
How the Logic
component works:
- When
Logic
is called upon to execute a command, it uses theAddressBookParser
class to parse the user command. - This results in a
Command
object (more precisely, an object of one of its subclasses e.g.,CreateCommand
) which is executed by theLogicManager
.-
UndoableCommand
is another interface that extends from theCommand
interface which represents commands that have undo/redo logic. - Commands that implements
UndoableCommand
are managed in theCommandManager
.
-
- The command can communicate with the
Model
when it is executed (e.g. to add a person). - The result of the command execution is encapsulated as a
CommandResult
object which is returned fromLogic
.
The Sequence Diagram below illustrates the interactions within the Logic
component for the execute("delete 1")
API call.

DeleteCommandParser
should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Here are the other classes in Logic
(omitted from the class diagram above) that are used for parsing a user command:
f
How the parsing works:
- When called upon to parse a user command, the
AddressBookParser
class creates anXYZCommandParser
(XYZ
is a placeholder for the specific command name e.g.,CreateCommandParser
) which uses the other classes shown above to parse the user command and create aXYZCommand
object (e.g.,CreateCommand
) which theAddressBookParser
returns back as aCommand
object. - All
XYZCommandParser
classes (e.g.,CreateCommandParser
,DeleteCommandParser
, …) inherit from theParser
interface so that they can be treated similarly where possible e.g, during testing.
Model component
API : Model.java
The Model
component,
- stores the address book data i.e., all
Person
objects (which are contained in aUniquePersonList
object). - stores the currently ‘selected’
Person
objects (e.g., results of a search query) as a separate filtered list which is exposed to outsiders as an unmodifiableObservableList<Person>
that can be ‘observed’ e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change. - stores a
UserPref
object that represents the user’s preferences. This is exposed to the outside as aReadOnlyUserPref
objects. - does not depend on any of the other three components (as the
Model
represents data entities of the domain, they should make sense on their own without depending on other components)
Person Enhancements
Enhancement 1 : Net Worth
The person model now contains a Net Worth
field.
Net Worth
is implemented as a class where it contains a final string value
, final static string
MESSAGE_CONSTRAINTS
and final static string
VALIDATION_REGEX
.
- Net Worth accepts a string that has an immutable value.
- Net Worth is a non-compulsory field. A user will only engage with a client if they know their net worth.
- Net Worth
VALIDATION_REGEX
ensures that only Net Worth inputs that begins with a $ sign and has more than 4 digits are accepted.
Design Considerations
-
Choice 1 (current choice) : Compulsory Net Worth field in person and
VALIDATION_REGEX
calculated in dollars and must be more than 4 digits.- Pros: Standardisation of currency and minimum net worth.
- Cons: Unable to create a contact without knowing the client’s net worth and net worth must be more than a minimum amount.
-
Choice 2 : Non-compulsory Net Worth field and
VALIDATION_REGEX
has no currency constraints nor minimum amount.- Pros: Flexibility in creating a contact.
- Cons: No means of comparison between a contact of different currency.
Enhancement 2 : Tag
The person model now contains a Tag
field.
Tag
is implemented as a class where it contains a final string value
, final static string
MESSAGE_CONSTRAINTS
and final static string
VALIDATION_REGEX
.
- Tag field’s
VALIDATION_REGEX
ensures that onlyTag
values ofSECURED
orPOTENTIAL
are accepted. - Tag is implemented as a Set which means a Person object can have more than one tag.
Improvements
- Due to limitations we were not able to set an ideal 1 tag constraint to the tag field since the logic behind the 2 tags are mutually exclusive.
- A check should be made to ensure that a person only has one tag to prevent one client from having both mutually exclusive tags.
Enhancement 3 : FilePath
Find out more information at FilePath.
Enhancement 4 : MeetingTimes
Find more information at MeetingTimes.
Storage component
API : Storage.java
The Storage
component,
- can save both address book data and user preference data in json format, and read them back into corresponding objects.
- inherits from both
AddressBookStorage
andUserPrefStorage
, which means it can be treated as either one (if only the functionality of only one is needed). - depends on some classes in the
Model
component (because theStorage
component’s job is to save/retrieve objects that belong to theModel
)
Common classes
Classes used by multiple components are in the seedu.addressbook.commons
package.
Implementation
This section describes some noteworthy details on how certain features are implemented.
Opening of Person specific PDF files
Implementation of the opening PDF file of client feature is built on top of the way that the PDF filepath is stored.
Implementation
The mechanism is facilitated by SetPersonFileCommand
and FileUtil
.
SetPersonFileCommand
extends from Command
. It overwrites the Command#execute()
method to determine if the given filepath is valid and create an “EditedPerson” Person
object.
The FileUtil#checkValidPdfFilePath()
method is used in SetPersonFileCommand
to check the validity of the file path. The method follows the given filePath to check if the file exists and if the given filepath is of type .pdf
.
Given below is an example usage scenario and how the set file mechanism behaves at each step.
Step 1. The user launches the application for the first time.
Step 2. The user decides to add a file path to the 2nd person in the current list of contacts in the address book using the filepath 2 f/C:\Users\Eugene Tay\Downloads\Tutorial_8_qns.pdf
command.
Step 3. LogicManager
calls LogicManager#execute()
method that was implemented from Logic
interface. Within the method, AddressBookParser#parseCommand()
is called on the user input filePath
and a Command
object is returned.
Step 4. AddressBookParser::parseCommand
will parse the user input and match the COMMAND_WORD
to be filepath
which is SetPathFileCommand#COMMAND_WORD
SetPathFileCommandParser
object is instantiated which parses and checks the user arguments.
Step 5. SetPathFileCommandParser
object parses the given user arguments. If the PREFIX_FILEPATH
is present and there is no IllegalValueException
, a SetPersonFileCommand
object is instantiated with index
and filePath
obtained from the user arguments.
Step 6. SetPathFileCommand#execute()
method is called in LogicManager
. This method will check if the given PDF filepath is valid with FileUtil#checkValidPdfFilePath()
method.
Step 7. SetPathFileCommand#execute()
method will instantiate a new Person
object with the original Person
object’s attributes and the new filePath. This Person
object be set in Model
and updated in filterPersonList
.
The following sequence diagram shows how the assigning filepath to a client works up till the setPersonFileCommand.
The next sequence diagram shows how setPersonFileCommand works.
The following activity diagram shows how the assigning filepath to a client feature works.
Design Considerations:
Choice 1 (Current Choice) : Store PDF’s absolute path.
- Pros:
- Absolute path of the PDF would mean that changes to the file location of User’s FABook will not affect the ability to open PDF.
- Cons:
- Changing file location of PDF will render stored filepath useless.
Choice 2 : Store PDF files of clients in a folder.
- Pros:
- Users do not need to input absolute path as it is more technical than relative paths.
- Cons:
- Changes to the file location of User’s FABook will mean that the PDF cannot be opened anymore since it is relative to the filepath of FABook.
Meeting Feature
MeetingTime
is used to model a meeting with a client.
Implementation
MeetingTime
stores meetings primarily as a value
, displayValue
and date
.
-
value
of typeString
: Used to for storingMeetingTime
as a Json Object -
displayValue
of typeString
: Used for displayingMeetingTime
onMeetingCard
,PersonCard
andPersonProfile
-
date
of typejava.time.LocalDateTime
: Used for sortingMeetingTime
s forMeetingsWindow
andSyncCommand
Design Considerations
Aspect: MeetingTime Object
-
Choice 1 (current choice): Person object contains its own set of MeetingTime
- Pros: Easier to implement given the short amount of time
- Cons: Harder to sort/filter/manipulate
-
Choice 2 (ideal choice): Bidirectional navigation between MeetingTime and Person
- Pros: Better abstraction therefore easier to perform MeetingTime specific tasks(e.g. sort, filter)
- Cons: More complicated to implement
Related Features
Sync Meetings feature
Implementation
The Sync Meetings feature is facilitated by the following operation:
-
Person#syncMeetingTimes()
— Iterates through allMeetingTime
s aPerson
has and removes those that have passed.
This operation is exposed in the Model interface as Model#syncMeetingTimes()
Example Usage:
Step 1. User executes sync
. Model#syncMeetingTimes()
is called by SyncCommand#execute(Model)
.
Step 2. Model#syncMeetingTimes()
calls AddressBook
which calls UniquePersonList#syncMeetingTimes()
.
Step 3. UniquePersonList#syncMeetingTimes()
calls Person#syncMeetingTimes()
for each person in UniquePersonList#internalList
Step 4. In Person#syncMeetingTimes()
, the predicate MeetingTimePastPredicate()
is passed into MeetingTimes#removeIf(Predicate)
which removes meetings that are before the time of execution.
Design
Design Considerations
Aspect: Sync Meeting
-
Choice 1 (current choice): In place filter of uniquePersonList
- Pros: Simple to implement
- Cons: Hard to introduce undo logic
-
Choice 2: New instance of uniquePersonList when syncing
- Pros: Easy to introduce undo logic
- Cons: Breaks singularity of address book in model or uniquePersonList in address book
Upcoming Meetings feature
Implementation
The mechanism is facilitated by MeetingsWindow
, MeetingListPanel
and MeetingCard
.
MeetingsWindow
extends UIPart<Stage>
and is linked to an FXML Menu Item meetingsMenuItem
in MainWindow
. This means that MeetingsWindow
can be accessed from the menu bar as a menu item from the GUI as well.
The construction of MainWindow
object, instantiates a MeetingsWindow
object and MainWindow#setAccelerator()
method is called.
The MainWindow#setAccelerator()
method sets a shortcut that establishes a shortcut f2
to the calling of MainWindow#handleMeetings()
method.
MainWindow#handleMeetings()
method calls MeetingsWindow#getMeetings()
method that filters a list with MeetingsWindow#isWithinOneWeek()
method returning an ObservableList<Person>
of Person
objects who have meetings from now till 7 days later.
The ObservableList<Person>
is used to instantiate MeetingCard
objects and populate the MeetingListPanel
. The classes work in conjunction with the .FXML
files to display the MeetingCard
on a MeetingListPanel
in a MeetingsWindow
.
Example Usage
Step 1. User presses f2
to see upcoming meetings.
Step 2. f2
is set by MainWindow#setAccelerator()
to call MainWindow#handleMeetings()
method which in turn calls MeetingsWindow#getMeetings()
.
Step 3. MeetingsWindow#getMeetings()
method filters a list of Person
objects by calling MeetingsWindow#isWithinOneWeek()
method on the Set<MeetingTime>
of each Person
. The filtered list will contain Person
objects that have meetings from now till 7 days later.
Step 4. MeetingsWindow#getMeetings()
instantiates a MeetingsListPanel
object where MeetingsListPanel#updateItem()
method creates a MeetingCard
for each Person
in the list and the MeetingsListPanel
is populated with MeetingCard
objects on the MeetingsWindow
.
The following sequence diagram shows how upcoming meetings feature works.
The following activity diagram shows how upcoming meetings feature works.
Design Considerations:
Display Choice 1 (Current Choice) : Pop up Meetings window.
- Pros:
- Clear segregation from Main UI.
- Does not take up real estate on the Main UI.
- Cons:
- Extra window to be created and managed.
Choice 2 : Displayed on a section of Main Window.
- Pros:
- No extra window to be managed.
- Cons:
- Cluttered UI.
Meeting Card Display Choice 1 (Current Choice) : Display Meetings Card by Person.
- Pros:
- Clear distinction by client of the meetings that user will have with.
- Cons:
- Not intuitive for consolidated meetings in a day.
Choice 2 : Display Meetings Card by date.
- Pros:
- Intuitive consolidated meetings per day.
- Cons:
- Overhaul of new classes and object where a
MeetingTime
has-aPerson
rather than the current implementation of aPerson
has-aMeetingTime
.
- Overhaul of new classes and object where a
Undo/redo feature
Implementation
The undo/redo mechanism is facilitated by UndoableCommands
and CommandManager
.
UndoableCommand
extends from Command
and implements its own undo and redo methods. Command
s that implement UndoableCommand
include:
-
CreateCommand
— Deletes and adds saved person object for undo and redo methods respectively. -
DeleteCommand
— Adds and deletes saved person object for undo and redo methods respectively. -
UpdateCommand
— Saves the original and edited person objects and sets them accordingly for undo and redo methods. -
ClearCommand
— Restores the saved original address book and sets address book to new address book for undo and redo methods respectively.
CommandManager
stores UndoableCommand
s that have been executed and that have been undone in an undoStack
and redoStack
respectively. Additionally, CommandManager
implements the following operations:
-
CommandManager#pushNewCommand(Command)
— Saves the latest undoable command that was executed by user in its history. -
CommandManager#undo(UndoableCommand)
— Undoes the last undoable command from the top of the undo-stack. -
CommandManager#redo(UndoableCommand)
— Redoes the last undoable command from the top of the redo-stack.
These operations are exposed in the Logic
interface as Logic#execute()
, Logic#undo()
and Logic#redo()
respectively.
Example Usage
Given below is an example usage scenario and how the undo/redo mechanism behaves at each step.
Step 1. The user launches the application for the first time. The CommandManger
will be initialized with an empty undoStack
and redoStack
.
Step 2. The user executes delete 5
command to delete the 5th person in the address book. CommandManager#pushNewCommand()
is called by Logic#execute()
, saving the DeleteCommand
in the undoStack
.
Step 3. The user executes add n/David …
to add a new person. CommandManager#pushNewCommand()
is called by Logic#execute()
, saving the AddCommand
in the undoStack
.

CommandManager#pushNewCommand()
, so the invalid command will not be saved into the undoStack
.
Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the undo
command. The undo
command will call Logic#undo()
which calls CommandManager#undo()
, which will pop the latest UndoableCommand
from the undoStack
and calls the #UndoableCommand#undo()
method of that command which reverts the addressbook back to its previous state. The command popped is pushed to the redoStack
.
The following sequence diagram shows how the undo command works up till CommandManager:
The next sequence diagram shows how CommandManager executes undo:
The redo
command does the opposite — it calls Logic#redo()
which calls CommandManager#redo()
, which pops the latest UndoableCommand
from the redostack
and calls the UndoableCommand#redo()
of that command which reverts the addressbook to the state after the command execution. The command is added back to the undoStack
.
Step 5. The user then decides to execute the command list
. Commands that do not modify the address book, such as list
, will usually not be added to the undoStack by CommandManger#pushNewCommand()
. Thus, the undoStack
remains unchanged.
Step 6. The user executes clear
, which calls CommandManager#pushNewCommand()
. Since there redoStack is not empty, CommandManager#pushNewCommand
then calls CommandManger#clearRedoStack
. Reason: It no longer makes sense to redo the add n/David …
command. This is the behavior that most modern desktop applications follow.
The following activity diagram summarizes what happens when a user executes a new command:
Design considerations:
Aspect: How undo & redo executes:
-
Choice 1 (current choice) : Individual command knows how to undo/redo by
itself.
- Pros: Will use less memory (e.g. for
delete
, just save the person being deleted). - Cons: We must ensure that the implementation of each individual command are correct.
- Pros: Will use less memory (e.g. for
-
Choice 2 : Saves the entire address book.
- Pros: Easy to implement.
- Cons: May have performance issues in terms of memory usage.
Documentation, logging, testing, configuration, dev-ops
Appendix: Requirements
Product scope
Target user profile:
- has a need to contact and liaise with many clients to sell their products
- prefer desktop apps over other types
- can type fast
- prefers typing to mouse interactions
- is reasonably comfortable using CLI apps
- split clients according to potential and secured
- has many different types of clients (etc. high/low accident rate, injury-prone)
- has difficulty remembering clients’ information
- faces trouble in scheduling client meet-ups for both time and location
- wish to filter based on address
Value proposition:
- manage clients faster than a typical mouse/GUI driven app
- categorise client according to status and risk for the user to plan their schedule
- inbuilt calendar to track meetings
- search system via location and client meetup suggestions
User stories
Priorities: High (must have) - * * *
, Medium (nice to have) - * *
, Low (unlikely to have) - *
Priority | As a … | I want to … | So that I can… |
---|---|---|---|
* * * |
new user | see usage instructions | refer to instructions when I forget how to use the App |
* * * |
user | add a new client | |
* * * |
user | delete a client | remove entries that I no longer need |
* * * |
user | find a client by name | locate details of clients without having to go through the entire list |
* * * |
user | save written information | access previously saved information |
* * |
user | find a client by address | locate details of clients in a designated area |
* * |
user | keep track of planned meetings | know when to meet which clients |
* * |
user | be reminded of meetings | stop missing important meetings |
* * |
tech-savvy user | input shortcut commands | be more efficient using the app |
* * |
user | update a client’s information | make changes whenever clients’ information update |
* * |
user afraid of making mistakes | quickly revert my actions | walk back on decisions or correct errors |
* |
user with many persons in the client book | sort clients by name | locate a client easily |
{More to be added}
Use cases
(For all use cases below, the System is the FABook
and the Actor is the user
, unless specified otherwise)
Use case: UC01 - Requesting for help
Main Success Scenario (MSS)
- User requests for help.
- FABook shows an external link for help.
- User refers to link for help.
Use case ends.
Use case: UC02 - Listing all clients
Main Success Scenario (MSS)
- User requests to list clients.
- FABook shows a list of clients.
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
Use case: UC03 - Creating a client contact
Main Success Scenario (MSS)
- User requests to create a client contact.
- FABook adds the client contact to its contents.
- FABook informs user that input client contact has been successfully added.
Use case ends.
Extensions
- 1a. Format of creation is invalid.
- 1a1. FABook shows an error message with suggested format of client contact creation.
Use case ends.
- 1b. Input information field is in the wrong format.
- 1b1. FABook shows an error message with suggested format of the input information field.
Use case ends.
Use case: UC04 - Assigning a PDF file to a client
Main Success Scenario (MSS)
- User prepares the file path to the intended PDF file.
- User assigns the file to the client.
- FABook informs user that file path has been successfully added to the chosen client.
Use case ends.
Extensions
- 1a. Format of file assignment is invalid.
- 1a1. FABook shows an error message with suggested format of file assignment.
Use case ends.
Use case: UC05 - Finding a client by name
Main Success Scenario (MSS)
- User requests to find clients by a specific name.
- FABook shows a list of matching clients.
- FABook informs the user of number of clients found.
Use case ends.
Extensions
- 1a. No client name was provided.
- 1a1. FABook shows an empty list.
Use case ends.
- 1b. No such client with the specified name is found.
- 1b1. FABook shows an error message with suggested format of finding by name.
Use case ends.
Use case: UC06 - Finding a client by phone number
Main Success Scenario (MSS)
- User requests to find clients by a specific phone number.
- FABook shows a list of matching clients.
- FABook informs the user of number of clients found.
Use case ends.
Extensions
- 1a. No client number was provided.
- 1a1. FABook shows an error message with suggested format of finding by phone number.
Use case ends.
- 1b. No such client with the specified number is found.
- 1b1. FABook shows an empty list.
Use case ends.
Use case: UC07 - Finding a client by address
Main Success Scenario (MSS)
- User requests to find clients by a specific address.
- FABook shows a list of matching clients.
- FABook informs the user of number of clients found.
Use case ends.
Extensions
- 1a. No client address was provided.
- 1a1. FABook shows an error message with suggested format of finding by address.
Use case ends.
- 1b. No such client with the specified address is found.
- 1b1. FABook shows an empty list.
Use case ends.
Use case: UC08 - Finding a client by tag
Main Success Scenario (MSS)
- User requests to find clients by a specific tag.
- FABook shows a list of matching clients.
- FABook informs the user of number of clients found.
Use case ends.
Extensions
- 1a. No tag was provided.
- 1a1. FABook shows an error message with suggested format of finding by address.
Use case ends.
- 1b. No such client with the specified tag is found.
- 1b1. FABook shows an empty list.
Use case ends.
Use case: UC09 - Opening the PDF file of a client
Main Success Scenario (MSS)
- User requests to open a specific client’s PDF file.
- FABook informs the user that the PDF file has been successfully opened.
- Client’s PDF file is opened on the user’s operating system according to their default PDF file reader.
Use case ends.
Extensions
- 1a. No PDF file was assigned to the client beforehand.
- 1a1. FABook shows an error message that file path of client has not been assigned yet.
Use case ends.
- 1b. The given index is invalid.
- 1b1. FABook shows an error message that the index provided is invalid.
Use case ends.
- 1c. FABook detects that the assigned PDF file was moved, edited or deleted.
- 1c1. FABook shows an error message that the file path has been modified.
Use case ends.
Use case: UC10 - Checking for upcoming meetings
Main Success Scenario (MSS)
- User opens up the upcoming meetings.
- FABook shows upcoming meetings in a new window.
Use case ends.
Extensions
- 1a. There are no upcoming meetings
- 1a1. FABook shows an empty list in the upcoming meetings window.
Use case ends.
Use case: UC11 - Updating a client’s information
Preconditions: There are existing clients in FABook’s contents.
Main Success Scenario (MSS)
- User requests to update a specific client’s information.
- FABook updates the given client’s information.
- FABook informs user of updated client’s information.
Use case ends.
Extensions
- 1a. The given index is invalid.
- 1a1. FABook shows an error message that the index provided is invalid.
Use case ends.
- 1b. No input information field was given.
- 1b1. FABook shows an error message that an information field must be provided.
Use case ends.
- 1c. Input information field is in the wrong format.
- 1c1. FABook shows an error message with suggested format of the input information field.
Use case ends.
Use case: UC12 - Updating a client’s description
Preconditions: There are existing clients in FABook’s contents.
Main Success Scenario (MSS)
- User requests to update the description of a specific client.
- FABook updates the description of the specified client.
- FABook informs user that the description has been updated.
Extensions
- 1a. The given index is invalid.
- 1a1. FABook shows an error message that the index provided is invalid.
Use case ends.
Use case: UC13 - Adding new meeting(s) to an existing client
Preconditions: There are existing clients in FABook’s contents.
Main Success Scenario (MSS)
- User requests to add new meeting(s) to a specific client.
- FABook adds new meeting(s) to the specified client.
- FABook informs user that new meeting(s) have been added to the specified client.
Extensions
- 1a. The given index is invalid.
- 1a1. FABook shows an error message that the index provided is invalid.
Use case ends.
- 1b. Format of meeting time given is invalid.
- 1b1. FABook shows an error message with suggested format of meeting time.
Use case ends.
Use case: UC14 - Deleting a client
Main Success Scenario (MSS)
- User requests to find a client by specified name(UC05).
- User requests to delete a specific client by name in the list.
- FABook deletes the client.
- FABook informs the user that the specified client has been successfully deleted.
Use case ends.
Extensions
- 2a. The given index is invalid.
- 2a1. FABook shows an error message that the index provided is invalid.
Use case ends.
Use case: UC15 - Deleting meetings from a client
Main Success Scenario (MSS)
- User requests to find a client by specified name(UC05).
- User requests to delete a specific meeting from the client.
- FABook deletes the specified meeting from the client.
- FABook informs the user that the specified meeting has been successfully deleted from the client.
Use case ends.
Extensions
- 2a. The given index is invalid.
- 2a1. FABook shows an error message that the index provided is invalid.
Use case ends.
- 2b. Format of meeting time given is invalid.
- 2b1. FABook shows an error message with suggested format of meeting time.
Use case ends.
Use case: UC16 - Removing all past meetings
MSS
- User requests to remove all meetings that have past.
- FABook deletes all meetings that have past from every client.
- FABook informs the user that all past meetings have been successfully deleted.
Use case ends.
Use case: UC17 - Clearing all entries
Main Success Scenario (MSS)
- User requests to clear all entries.
- FABook deletes all clients and their information.
- FABook informs the user that all information has been cleared.
Use case ends.
Use case: UC18 - Undoing a previous command
Main Success Scenario (MSS)
- User requests to undo a previous command.
- FABook undoes the last undoable action and updates the relevant information changed.
- FABook informs the user of the undoable action that has been executed.
Use case ends.
Extensions
- 1a. No previous commands available.
- 1a1. FABook shows an error message that there are no commands to undo.
Use case ends.
- 1b. The previous command is not undoable.
- 1b1. FABook shows an error message that there are no commands to undo.
Use case ends.
Use case: UC19 - Redoing an undo command
Main Success Scenario (MSS)
- User requests to undo a previous command(UC18).
- User requests to redo the undo command.
- FABook redoes the last undo command and updates the relevant information changed.
- FABook informs the user of the redone action that has been executed.
Use case ends.
Use case: UC20 - Exiting FABook
Main Success Scenario (MSS)
- User requests to exit.
- FABook closes.
Use case ends.
{More to be added}
Non-Functional Requirements
- Should work on any mainstream OS as long as it has Java
11
or above installed. - Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.
- A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.
- The system should work on both 32-bit and 64-bit environments.
{More to be added}
Glossary
- Mainstream OS: Windows, Linux, Unix, OS-X
Appendix: Instructions for manual testing
Given below are instructions to test the app manually.

Launch and shutdown
-
Initial launch
-
Download the jar file and copy into an empty folder
-
Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
-
-
Saving window preferences
-
Resize the window to an optimum size. Move the window to a different location. Close the window.
-
Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained.
-
-
{ more test cases … }
Creating a person
-
Creating a person with a duplicate already present
-
Prerequisite: A person with name
Alice Tan
and phone number12345678
on the list. Other fields may be present with any value. -
Test case:
create n/Alice Tan p/12345678
Expected: No new person created. Error details shown in the command display. -
Test case:
create n/Alice Tan p/87654321
Expected: A new person is added to the list. Details of the new person shown in the command display. -
Other viable create commands to try:
create n/Bob Wang p/12345678
,create n/alice tan p/12345678
,create n/alice tan p/12345678
Expected: Success. Similar to previous.
-
Assigning a PDF file to a person
-
Assigning a PDF file to a person without PDF file assigned.
-
Create a PDF file on your computer.
-
Test case:
filepath INDEX f/FILEPATH
whereFILEPATH
is the absolute file path of the PDF file from step 1.
Expected: PDF file assigned. Client details shown in the command display.-
Click on the client in the result display.
-
Scroll down the contact information window.
Expected:Client Information
button in high-contrast white borders and is clickable. -
Click on the
Client Information
button
Expected: The PDF file is opened.
-
-
Test case:
filepath INDEX f/RELATIVE FILEPATH
whereRELATIVE FILEPATH
is the file path of the PDF relative to the directory of FABook. Expected: PDF File is assigned. Client details shown in the command display.-
Click on the client in the result display.
-
Scroll down the contact information window.
Expected:Client Information
button in high-contrast white borders and is clickable.
-
-
Other incorrect inputs to try: Incorrect filepaths, filepaths for other file types (e.g. .doc)
Expected: PDF file not assigned. Error details shown in the command display. See previous. -
See Opening PDF file below for more related testing.
-
-
Assigning a PDF file to a person already with PDF file assigned.
-
Assign a PDF file to a person as instructed in the previous tests.
-
Create a new PDF file on your computer.
-
Test case:
filepath INDEX f/NEWFILEPATH
whereNEWFILEPATH
is the absolute file path of the new PDF file from step 2.
Expected: PDF file assigned. Client details shown in the command display.-
Click on the client in the result display.
-
Scroll down the contact information window.
Expected:Client Information
button in high-contrast white borders and is clickable. -
Click on the
Client Information
button
Expected: The new PDF file is opened.
-
-
Test case:
filepath INDEX f/RELATIVE FILEPATH
whereRELATIVE FILEPATH
is the file path of the PDF relative to the directory of FABook. Expected: PDF file assigned. Client details shown in the command display.-
Click on the client in the result display.
-
Scroll down the contact information window.
Expected:Client Information
button in high-contrast white borders and is clickable. -
Click on the
Client Information
button
Expected: The new PDF file is opened.
-
-
Other incorrect inputs to try: Incorrect filepaths, filepaths for other file types (e.g. .doc)
Expected: new PDF file not assigned. Error details shown in the command display. See previous. -
See
Opening PDF file
below for more related testing.
-
Finding a person by name
-
Finding person by partial names
-
Use the
create
command to add to list a person namedJack
and another person namedJackson
. -
Test case:
find n/jack
Expected: BothJack
andJackson
are on the shown list. -
Test case:
find n/jackson
Expected:Jackson
is on the shown list.Jack
is not.
-
-
Finding person using multiple names
-
Use the
create
command to add to list a person namedAmy Lin
, a person namedBob Wang
, and another person namedCarol Chen
. -
Test case:
find n/amy bob
Expected: BothAmy Lin
andBob Wang
are on the shown list.Carol Chen
is not shown on the list. -
Test case:
find n/dave lin
Expected:Amy Lin
is on the shown list.Bob Wang
andCarol Chen
are not shown on the list.
-
Finding a person by number
-
Finding person using multiple numbers
-
Use the
create
command to add to list a person namedAlice
with phone12345678
and another person namedBob
with phone87654321
. -
Test case:
find p/87654321 12345678
Expected: BothAlice
andBob
are on the shown list. -
Test case:
find p/12345678 11111111
Expected:Alice
is on the shown list.Bob
is not.
-
-
Finding multiple persons with the same number
-
Use the
create
command to add to list a person namedAlice Tan
with phone12345678
and another person namedPeter Tan
with phone12345678
. -
Test case:
find p/12345678
Expected: BothAlice Tan
andPeter Tan
are on the shown list.
-
Finding a person by address
-
Finding person by address with shortcuts
-
Use the
create
command to add to list a person namedAlice Tan
with address21 Lower Kent Ridge Rd, Singapore
. -
Test case:
f a/Kent Ridge
Expected:Alice Tan
is on the shown list inresults display
.
-
Finding persons by tag
-
Prerequisites: Multiple clients on the list. Some clients have the tag
POTENTIAL
. Some clients have the tagSECURED
. -
Finding persons using one tag
-
Test case:
find t/SECURED
Expected: All clients with the tagSECURED
are shown inresults display
. No other clients are shown. -
Test case:
find t/secured
Expected: Success. Same as previous. -
Test case:
find t/signed
Expected: No change inresults display
. Error details shown in the command display.
-
-
Finding persons using multiple tags
-
Test case:
find t/SECURED POTENTIAL
Expected: All clients with the tagPOTENTIAL
are shown inresults display
. No other clients are shown. -
Test case:
find t/potential secured
Expected: All clients with the tagSECURED
are shown inresults display
. No other clients are shown.
-
Opening PDF file
-
Filepath not assigned
-
Add a new client using
create
command. -
Click on the newly added client.
-
Scroll down the
Contact Information
window.
Expected: A greyed outNo Client Information
button is visible. -
Try to click on the
No Client Information
button.
Expected: No file opened. No message shown. -
Test case:
file INDEX
where INDEX is the index of the new client on the list.
Expected: No file opened. Error details shown in the command display.
-
-
Filepath is assigned
-
Add a new client using
create
command. -
Assign a PDF file to a person - See Assigning a PDF file to a person for examples on how to assign PDFs.
-
Test case:
file INDEX
where INDEX is the index of the new client on the list.
Expected: The PDF file is opened. -
Test case; Click on the
Client Information
button
Expected: The PDF file is opened.
-
-
Dealing with invalid filepaths
-
Create a PDF file on your computer.
-
Use
filepath
command to assign the PDF file to a client in the FABook. -
Rename or delete the PDF file on your computer.
-
Try to open the file from within FABook using
file
command orClient Information
button.
Expected: No file is opened. Error details shown in the command display or below theClient Information
button. -
Exit the app.
-
Re-launch the app.
Expected: The app re-launches with previously stored data intact.
-
Get upcoming meetings
-
Getting upcoming meetings
-
Add multiple meeting to multiple clients in FABook with meeting times within the next 7 days.
-
Add multiple meeting to multiple clients in FABook with meeting times before the present time.
-
Add multiple meeting to multiple clients in FABook with meeting times later than 7 days from the present time.
-
Press
F2
or click onMeetings
button then theUpcoming Meetings F2
button that appears.
Expected: A new window with titleUpcoming Meetings
appear. Only the meetings added in step 1 are displayed.
-
-
Getting upcoming meetings with Upcoming Meetings window open
-
Perform step 1~4 in
Getting upcoming meetings
above. -
Switch the current window to one different from the
Upcoming meetings
window without closing theUpcoming meetings
window. -
Press
F2
or click onMeetings
button then theUpcoming Meetings F2
button that appears.
Expected: TheUpcoming meetings
window re-appears to the front.
-
-
Getting upcoming meetings after updating with Upcoming Meetings window open
-
Perform step 1~4 in
Getting upcoming meetings
above. -
Swtich back to the main FABook window.
-
Add one meeting to any client with meeting time within the next 7 days.
-
Close the
Upcoming Meetings
window. -
Press
F2
or click onMeetings
button then theUpcoming Meetings F2
button that appears.
Expected: AUpcoming Meetings
window appear. The meeting added in step 3 is displayed on the list.
-
Update client information:
-
Updating client information though input shortcut:
- Test case:
u 1 nw/$22000
Expected: Networth of first client change to$22000
. New client detail shown in command display.
- Test case:
Update descriptions:
-
Adding a description
-
Test case:
description 2 ds/Eager to invest
Expected: Description of the second client changed toEager to invest
. -
Test case:
description ds/Eager to invest
Expected: No change in descriptions made. Error details shown in command display. -
Other test cases:
description
,description 0 ds/Eager to invest
Expected: No change in descriptions made. Error details shown in command display.
-
-
Removing a description
-
Test case:
description 2 ds/
Expected: Description of the second client removed. “Removed Description: “ message shown in command display. -
Other test cases:
description
,description 0 ds/
Expected: No change in descriptions made. Error details shown in command display.
-
Update meetings:
-
Adding multiple meetings to the same person
-
Test case:
meeting 2 mt/19-10-2022-10:34 mt/23-11-2022-22:22
Expected: Two meetings are successfully added. Details of the updated person shown in the command display.- Click on the second client on the
result display
.
Expected: Two new meeting times are visible with a green background.
- Click on the second client on the
-
Test case:
meeting 2 mt/19-10-2022-10:34 23-11-2022-22:22
Expected: No meetings added. Error details shown in the command display. -
Other incorrect inputs:
meeting 0 mt/19-10-2022-10:34
,meeting 2 mt/31-09-2022-10:34
,meeting 2 mt/19-10-2022-10:60
-
-
Re-adding the same meeting to the same person
-
Use
meeting 2 mt/19-10-2022-10:34
to add a meeting. -
Re-enter
meeting 2 mt/19-10-2022-10:34
Expected: Success message shown in command display.- Click on the second client on the
result display
.
Expected: Only one19 October 2022 10:34
. No duplicate meetings.
- Click on the second client on the
-
Deleting a person
-
Deleting a person while all persons are being shown
-
Prerequisites: List all persons using the
list
command. Multiple persons in the list. -
Test case:
delete 1
Expected: First contact is deleted from the list. Details of the deleted contact shown in the command display. -
Test case:
delete 0
Expected: No person is deleted. Error details shown in the command display. -
Other incorrect delete commands to try:
delete
,delete x
,...
(where x is larger than the list size)
Expected: Similar to previous.
-
-
Deleting a person while a filtered list of persons is being shown
-
Prerequisites: Find certain persons using the
find
command. Multiple persons in the list. -
Test case:
delete 1
Expected: First contact is deleted from the list. Details of the deleted contact shown in the command display.- Use the
list
command to show all persons. Expected: The same contact is deleted from the main list.
- Use the
-
Test case:
delete 0
Expected: No person is deleted. Error details shown in the command display. -
Other incorrect delete commands to try:
delete
,delete x
,...
(where x is larger than the list size)
Expected: Similar to previous.
-
Delete Meetings
-
Deleting assigned meeting
-
Meeting 2 mt/20-12-2012-20:12
to assign meeting time20-12-2012-20:12
to the second client. -
Test case
deletemeeting 2 mt/20-12-2012-20:12
Expected: Meeting time20-12-2012-20:12
removed from second client.Results display
updated. -
Test case
deletemeeting 2 mt/11-11-2011-11:11
Expected: No meeting removed. Error messageCouldn't find meeting time
and details shown in the command display. -
Other incorrected deletemeeting commands to try:
deletemeeting 2
,deletemeeting 0 mt/20-12-2012-20:12
Expected: No meeting removed. Error details shown in the command display.
-
Remove past meetings
-
Remove past meetings
-
Add multiple meeting to multiple clients in FABook with meeting times after the present time.
-
Add multiple meeting to multiple clients in FABook with meeting times before the present time.
-
Enter
sync
.
Expected: Meetings added in step 2 are removed. Success message displayed shown in the command display.
-
Undoing a previous command
-
Undoing create
-
Enter
create n/Amy p/11111111
Expected: New person created withName
: Amy andPhone
: 11111111. -
Enter
undo
Expected: Person removed. Removed person detail shown in the command display.
-
-
Undoing clear
-
Use
create
command to add multiple clients to FABook. -
Use
clear
command
Expected: All clients removed fromresults display
list. -
Enter
undo
Expected: All clients restored. Success message shown in the command display.
-
-
Undoing delete
-
Prerequisite: At least one client on displayed list.
-
Use
delete
command to remove a client. -
Enter
undo
Expected: Removed client restored. Success message shown in the command display.
-
-
Undoing list (non-undoable)
-
Prerequisite: No previous commands this session. Re-laund the app if there were previous inputs.
-
Use
list
command to view entire list. -
Enter
undo
Expected: No changes made to FABook. Error details shown in the command display.
-
-
Undoing with non-undoable commands in between
-
Similar to test 1, use
create
command to add a client to list. -
Use
list
command to view entire list. -
Use
help
command to view help window. -
Enter
undo
Expected: Successfully removed the client created in step 1.
-
-
Undoing multiple commands
-
Prerequisite: Multiple clients on displayed list.
-
Use
delete
command to remove a client. -
Repeat step 2 five times.
-
Enter
undo
Expected: Most recently removed client is restored. -
Re-enter
undo
with same number of repetition as step 3
Expected: All removed clients restored. Clients restored in reverse order of removal.
-
-
Undoing redo
-
Use
create
command to add a client to list. -
Enter
undo
Expected: Recently added client removed. -
Enter
redo
Expected: Client re-added. -
Enter
undo
Expected: Client re-removed. -
Enter
redo
Expected: Client re-added. -
Enter
undo
Expected: Client re-removed.
-
Saving data
-
Dealing with missing data files
-
Launch the app and exit after any number of actions.
-
In the same directory as the app, find folder
data
. -
Delete the
data
folder along with the fileFABook.json
inside. -
Re-launch the app.
Expected: The app launches with a auto-generated list of sample data containing six sample clients. The first sample client isAlex Yeoh
. -
Re-exit the app after any number of actions.
Expected: Thedata
folder is re-created with the fileFABook.json
inside.
-
-
Dealing with corrupted data files
-
Launch the app and exit after any number of actions.
-
In the same directory as the app, find folder
data
. -
Open the file
FABook.json
inside thedata
folder. -
Edit
FABook.json
so that it no longer follews the usual saved format. Save the changes made. -
Re-launch the app.
Expected: The app launches with an empty list. -
Re-exit the app after any number of actions.
Expected: The fileFABook.json
is replaced with new data in correct format.
-
Appendix: Effort
FABook was built across 13 weeks, with the first 7 weeks being used to understand the foundation it was built upon, AddressBook Level-3, as well as conceptualize, design and plan out the implementation of FABook. The 6 remaining weeks were used to incrementally implement functionalities on a weekly basis.
Difficulty Level
Given that each of us had to work on a similar individual project(iP) before banding together to work on this project, if the difficulty of the individual project is a 5, the difficulty of implementing FABook as an application is a 9. This is due to the following:
- Given more freedom to explore and create an application based on our team’s ideas, this encouraged us to push for more complex logic designs.
- Working in a team environment meant that there was a need to discuss and delegate tasks on a regular basis, which led to administrative challenges.
Challenges Faced
- Evolving any feature that was implemented in AB3 often leads to a chain reaction of changes to make such as the following:
- We have to ensure that other features of the program have not been broken through updating of automated test cases as well as manual testing.
- User guide and developer guide have to be updated accordingly to reflect any changes made.
- Dealing with bugs caused by any change may lead to a deep ‘rabbit-hole’ trying to fix what went wrong.
- Coordinating with the UI of the program after implementing new features.
- Dealing with team conflicts over design choices and time delay between different schedules of team members.
Effort required
When compared to the effort needed for everyone’s iP, it can be estimated ~150% of the effort needed for iP was used for this team project. Weekly consistent effort was needed by everyone to handle team deliverables and to ensure that a working product was ready at every milestone and iteration.
Achievements
- Implementation of the ability to assign and open client’s PDF document.
- UI redesigned to match a more aesthetically pleasing and purposeful look.
- Addition of new commands.
- Implementation of an upcoming meetings window which involved new UI and logic implementation.