Welcome to the PlanPal Developer Guide! Thank you for taking an interest in the behind-the-scenes work of our product. We hope this document proves informative and useful for your work!
A high-level overview of the system is shown in the Architecture Diagram below.
PlanPal
: Main entry of the program, initialises and connects to the UiUi
: In charge of printing messagesParser
: Determines the command to executeModes
: Determines the group of functionalities that the user wants to use.FileManager
: Read and write data from hard diskThe sequence diagram below describes how the components interacts with one another when the user issues a command.
For simplicity, the 3 different modes will be classified as :Mode
.
Sequence Diagram for PlanPal
Overview
The Ui
component handles operations that displays messages for the user to read as an instruction.
Additionally, it is also used to capture user inputs in certain functions.
Methods
The Ui
component has the following key methods:
Method | Description |
---|---|
printWelcomeMessage | Prints the welcome message |
printAvailableModes | Print all modes that are currently available in PlanPal |
printByeMessage | Prints the good bye message |
printCreateStorage | Prints the path to the storage that is created |
getSetCategory | Capture user input when using the category function in certain modes |
printCat | Prints the categories available in certain modes |
printCategoryNotFound | Prints when category is not found |
Custom print function that accepts multiple strings |
Design Considerations
This component was created as functionalities such as printing will be used in most of the classes in the PlanPal Application.
Consolidating all the print methods that are repeated reduces repetition in code and makes it easier to update when necessary.
Overview
This component handles the logic behind the application. The parser component consists of the parent Parser
Class and 3 children that inherits the Parser
Class. These 3 children are used when the respective modes are in play.
Class Diagram for Parser Component
Design Considerations
The Parser class follows this structure as there are common commands between the different modes. Using inheritance prevents the repetition of code. Additionally, different parsers were created since different modes require different functionalities.
The class diagram below represents the contact book system
Class Diagram for Contact Manager
General Classes
PlanPal
class is the main entry point of the system, containing a main(String[])
method to launch the application.ParserFactory
class is a factory that provides different parsers (e.g., ContactParser
) based on the input type.Parser
class is a class with methods to load and process commands from a file.BackUpManager
class manages data backups, including backing up, restoring, and creating directories for backup files.UI
class is responsible for displaying messages and menus to the user.ListFunctions
interface defines methods for list operations like adding, deleting, and finding items.FileManager
class handles saving and loading data to and from storageStorable
interface defines methods for managing storage paths and command descriptions.Editable
interface defines methods for editing command descriptions.Contact Classes
Contact
class represents a contact with attributes like name, phone, email, command description, and categories. It implements the Editable and Storable interfaces for editing and storage functionalities.ContactParser
class handles contact-related commands, processing strings and interacting with the ContactManager.ContactManager
class manages a list of contacts and categories, with methods to add, delete, edit, find, and search contacts and categories.SetContactCategory
class manages contact categories, providing methods for adding, removing, and validating categories.Methods
Methods |
---|
addContact |
deleteContact |
viewContactList |
editContact |
findContact |
The sequence diagram below illustrates the process for resolving the “add” command.
Components Breakdown:
Ui
component has been taken outContactParser
class is the Parser
componentContactManager
class is the Mode
componentExplanation:
The sequence diagram below illustrates the process for resolving the “delete” command.
Components Breakdown:
Ui
component has been taken outContactParser
class is the Parser
componentContactManager
class is the Mode
componentExplanation:
The sequence diagram below illustrates the process for resolving the “list” command.
Components Breakdown:
Ui
component has been taken outContactParser
class is the Parser
componentContactManager
class is the Mode
componentExplanation:
The sequence diagram below illustrates the process for resolving the “edit” command.
Components Breakdown:
Ui
component has been taken outContactParser
class is the Parser
componentContactManager
class is the Mode
componentExplanation:
The sequence diagram below illustrates the process for resolving the “find” command.
Components Breakdown:
Ui
component has been taken outContactParser
class is the Parser
componentContactManager
class is the Mode
componentExplanation:
The sequence diagram below illustrates the process for resolving the “category” command. ContactManager is omitted from the diagram for simplicity.
Components Breakdown:
ContactParser
class is the Parser
componentSetContactCategory
class is the Mode
componentExplanation:
The sequence diagram below illustrates the process for resolving the “search” command.
Explanation:
The ‘search’ command allows users to search contacts belonging to user-defined categories
The class diagram below represents the Expense Manager system.
Expense Classes
Expense
class represents an individual expense with attributes like command description, cost, month, name, and type. It implements the Editable and Storable interfaces for editing and storage functionalities.ExpenseType
class is an enumeration that categorizes expenses into different types.ExpenseParser
class is responsible for parsing expense-related commands and delegating them to the ExpenseManager
.ExpenseManager
class manages and processes expenses, interacting with the FileManager
, BudgetManager
, and RecurringManager
.RecurringExpense
class represents an expense that recurs monthly.RecurringManager
class manages recurring expenses, including adding, viewing, and removing them.BudgetManager
class manages user budgets, including setting, retrieving, and clearing budgets.ExpenseModeFunctions
interface defines methods for handling expense modes, such as current month and recurring expenses.The sequence diagram below illustrates the process from adding a budget (to a month).
Components Breakdown:
Ui
component has been taken outExpenseParser
class is the Parser
componentExpenseManager
class is the Mode
componentBudgetManager
class is created when ExpenseManager was constructedExplanation:
ExpenseParser
processes this command.The sequence diagrams below illustrate the process for resolving the “add” command.
Components Breakdown:
Ui
component has been taken outExpenseParser
class is the Parser
componentExpenseManager
class is the Mode
componentBudgetManager
class is created when ExpenseManager was constructedExplanation:
The way the add command works for expense manager is similar to how it works for contact manager. The key differences are listed below:
/recurring
and /month:
tag.The sequence diagram below illustrates the process for resolving the “list” command.
Components Breakdown:
Ui
component has been taken outExpenseParser
class is the Parser
componentExpenseManager
class is the Mode
componentRecurringManager
class is created when ExpenseManager was constructedExplanation:
The way the list command works for expense manager is similar to how it works for contact manager. The key difference are listed below:
/recurring
and /month:
tag.The sequence diagram below illustrates the process for resolving the “edit” command.
Components Breakdown:
Ui
component has been taken outExpenseParser
class is the Parser
componentExpenseManager
class is the Mode
componentRecurringManager
class is created when ExpenseManager was constructedExplanation:
The way the edit command works for expense manager is similar to how it works for contact manager. The key differences are listed below:
/recurring
and /month:
tag.The sequence diagram below illustrates the process for resolving the “delete” command.
Components Breakdown:
Ui
component has been taken outExpenseParser
class is the Parser
componentExpenseManager
class is the Mode
componentRecurringManager
class is created when ExpenseManager was constructedExplanation:
The way the delete command works for expense manager is similar to how it works for contact manager. The key differences are listed below:
/recurring
and /month:
tag.The sequence diagram below illustrates the process for resolving the “find” command.
Components Breakdown:
Ui
component has been taken outExpenseParser
class is the Parser
componentExpenseManager
class is the Mode
componentRecurringManager
class is created when ExpenseManager was constructedExplanation:
The way the find command works for expense manager is similar to how it works for contact manager. The key differences are listed below:
/recurring
and /month:
tag.The class diagram below represents the Activity Manager system.
The sequence diagram below illustrates the process for resolving the “add” command.
Components Breakdown:
Ui
component has been taken outActivityParser
class is the Parser
componentActivityManager
class is the Mode
componentExplanation:
The way the add command works for activity manager is similar to how it works for contact manager, with the only difference
being the names used, as well as an additional type to dictate activity type.
The sequence diagram below illustrates the process for resolving the “add” command.
Components Breakdown:
Ui
component has been taken outActivityParser
class is the Parser
componentActivityManager
class is the Mode
componentExplanation:
The way the delete command works for activity manager is similar to how it works for contact manager, with the only difference
being the names used.
The sequence diagram below illustrates the process for resolving the “edit” command.
Components Breakdown:
Ui
component has been taken outActivityParser
class is the Parser
componentActivityManager
class is the Mode
componentExplanation:
The way the edit command works for activity manager is similar to how it works for contact manager.
The sequence diagram below illustrates the process for resolving the “list” command.
Components Breakdown:
Ui
component has been taken outActivityParser
class is the Parser
componentActivityManager
class is the Mode
componentExplanation:
The way the list command works for activity manager is similar to how it works for contact manager.
The sequence diagram below illustrates the process for resolving the “find” command.
Components Breakdown:
Ui
component has been taken outActivityParser
class is the Parser
componentActivityManager
class is the Mode
componentExplanation:
The way the find command works for activity manager is similar to how it works for contact manager.
Our target user profile is international students studying in NUS.
Studying abroad can often feel overwhelming, and building a support network is essential to feeling connected and settled. This application empowers users to organize and easily access contact information and key details about the people they meet at NUS, fostering meaningful connections and a sense of community. Additionally, the app provides tools to manage spending effectively, helping international students stay on top of their finances and focus on making the most of their time in a new country.
Version | As a … | I want to … | So that I can … |
---|---|---|---|
v1.0 | NUS international student | see my list of contacts | easily call home or look for emergency contacts when needed |
v1.0 | NUS international student | add a contact | expand my list of useful contacts |
v1.0 | NUS international student | delete a contact | remove a contact if I no longer need it |
v1.0 | NUS international student | edit a contact | amend any mistakes when creating the contact or if the number has been changed |
v1.0 | NUS international student | save my contacts | my contacts are still there when I exit and enter the application again |
v2.0 | NUS international student | set a monthly budget | ensure that I do not spend more than a certain amount each month |
v2.0 | NUS international student | add an expense | keep track of what I am spending my money on |
v2.0 | NUS international student | delete an expense | remove inaccurate expenses |
v2.0 | NUS international student | list expenses | view all my current expenses |
v2.0 | NUS international student | edit an expense | change details regarding my past expenses |
v2.0 | NUS international student | find an expense | view the expense I am looking for quickly |
v2.0 | NUS international student | classify expenses into types | keep track of what type of items I am spending money on |
v2.0 | NUS international student | separate expenses by month | keep track of monthly expenses |
v2.0 | NUS international student | see a breakdown of my spending according to type | be more aware of my spending habits |
v2.0 | NUS international student | handle recurring expenses | keep track of monthly subscriptions conveniently |
v2.0 | NUS international student | see my list of activities | keep track of my schedule |
v2.0 | NUS international student | add an activity | expand my list of activities |
v2.0 | NUS international student | delete an activity | remove an activity when I have done it |
v2.0 | NUS international student | edit an activity | amend any mistakes when creating the activity or if the activity has been changed |
v2.0 | NUS international student | save my activities | my activities are still there when I exit and enter the application again |
View the User Guide for the full list of UI commands and their related use case and expected outcomes.