Savee Overview
Savee is a PC software specially designed for students who love typing. This purpose of this product is to help users better manage their finances. This project is under the NUS CS2113 (Software Engineering & Object-Oriented Programming) module. Students were asked to form a group with four members and develop a production with the base code AddressBook Level 4 provided.
Summary of contributions
completed
Major enhancement #1: added the ability to set limits for multiple periods of time.
-
What it does: allows the user to add, edit and delete multiple limits for different periods of time or a single day to better manage their spend. All the limits will be stored and automatically checked whenever the records were updated. The user will be reminded if any of the limits have been exceeded.
-
Justification:This feature improves the product significantly because the user will be able to better manage their finances by setting limits. This feature is challenging because it requires me to build a storage for limits to store limits' details and read from the storage. Besides that, I also need to keep limits' information updated whenever there is a change of records and generate output if any limit has been exceeded.
completed
Major enhancement #2: added the ability to set the monthly limit.
-
What it does: allows the user to add, edit and delete the continuous monthly limit which will always check the total spending for the current month. The user will be reminded if the monthly limits have been exceeded and the monthly limit will always be placed at the top of limits' information.
-
Justification:This feature improves the product significantly because the user will be able to make continuous limit for every month. Since user may not want to set the limit for every month, this function will provide the user with a convenient method to manage their monthly spend without entering similar commands every month. This feature is challenging because it requires me to get the current time and generate a special limit that will change according to different time.
completed
Major enhancement #3: added the ability to check all limits' condition.
-
What it does: allows the user to check all the existing limits' condition.
-
Justification: This feature improves the product significantly because the user is able to check all the limit he/she had set and have a better understanding about limits' conditions.
Code contributed(including tests): Example: oscarzeng
Contributions to the User Guide
Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users. |
Spending Limit Features
-
This section describes the limit feature that allows users to set values to control their future spending. Constraints that apply to records also apply to each limit. Refer to [constraints] for more information.
Adding a limit: addlimit
Adds a spending limit for a time period or a particular day to Savee.
Format: addlimit d/START_DATE END_DATE m/MONEYFLOW
(limit d/DATE m/MONEYFLOW
)+
When inputting two days, START_DATE and END_DATE indicates the starting date and ending date for the limit. If there is only one date, that day will be the time period. MONEYFLOW denotes the money spending limit for that period of time.
-
After the limits have been added, Savee will keep checking the latest condition of these limits. Once the total amount of money spent during this time period exceeds the spending limit, Savee will warn the user by sending the warning message.
Example:
-
addlimit d/20-8-2018 m/100
-
addlimit d/20-8-2018 30-8-2018 m/632
-
addlimit d/20-8-2018 30-8-2018 m/100
Auto-Completion:
-
Dates
-
Input text can be completed to dates that already exist in records in Savee.
-
Inputs starting with
d/
can be completed with dates as well as the argument that come immediately after the entired/DATE
input as long as there are only whitespaces between them. -
Text can also be completed to
today
orytd
.
-
-
Moneyflow
-
Does not offer auto-competion.
-
-
There will be no suggestions on parameters that come after the fourth.
Viewing all limits: checkLimit
Displays all limits information stored in Savee
Format: checklimit
Example:
-
checklimit
Deleting a limit: deleteLimit
Deletes an existing spending limit from Savee
Format: deleteLimit d/START_DATE END_DATE
(deleteLimit d/START_DATE
)
The deleting command is based on the date period, since there will be at most one limit for one period of time, user only need to enter a period of time or a single date. The limit with the same dates will be deleted. If there is no limit for that period, the program will throw errors. Delete
Examples:
-
deletelimit d/20-8-2018
-
deletelimit d/20-8-2018 30-8-2018
Auto-Completion:
-
Dates
-
Input text can be completed to dates that already exist in limits in Savee.
-
Dates suggested can only come from limits, it will not include dates entered in records in Savee.
-
Inputs starting with
d/
can be completed with dates as well as the argument that come immediately after the entired/DATE
input as long as there are only whitespaces between them. -
Text can also be completed to
today
orytd
.
-
-
There will be no suggestions on parameters that come after the third.
Editing a limit: editLimit
Edit a limit to Savee
Format: editLimit d/START_DATE END_DATE m/MONEYFLOW
(editLimit d/START_DATE END_DATE m/MONEYFLOW
)+
Editlimit is similar to Deleting a limit: deleteLimit
command, it is also based on the date period.
The editlimit command will check the input date period or the single day and
replace the original moneyFlow with the new moneyFlow.
Examples:
-
editlimit d/20-8-2018 m/200
-
editlimit d/20-8-2018 30-8-2018 m/200
Auto-Completion:
-
Dates
-
Input text can be completed to dates that already exist in limits in Savee.
-
Dates suggested can only come from limits, it will not include dates entered in records in Savee.
-
Inputs starting with
d/
can be completed with dates as well as the argument that come immediately after the entired/DATE
input as long as there are only whitespaces between them. -
Text can also be completed to
today
orytd
.
-
-
Moneyflow
-
Does not offer auto-competion.
-
-
There will be no suggestions on parameters that come after the fourth.
Adding a monthly limit: addmonthlylimit
Add a continuous monthly limit always for the current month.
Format: addmonthlylimit m/MONEYFLOW
The monthly limit will always check the spend of the current month according to the current time. For example, if the limit was set to be 200 at April, the limit will check the total spend for April. When the time comes to May, the limit will no longer check April, instead, the limit will check the total spend of May until the last second of May.
Examples:
-
addmonthlylimit m/200
Editing the monthly limit: editmonthlylimit
Edit an existing monthly limit.
Format: editmonthlylimit m/MONEYFLOW
The monthly limit will be replaced by the new monthly limit.
Examples:
-
editmonthlylimit m/200
Deleting the monthly limit: deletemonthlylimit
Delete the monthly limit.
Format: deletemonthlylimit
The monthly limit will be deleted and no longer check the spend of the current month.
Examples:
-
deletemonthlylimit
Contributions to the Developer Guide
Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project. |
Limit features
-
Limit features' storage:
-
The limit features are based on the data type
Limit
, which includes twoDate
s and onemoneyFlow
. When entering only one date, the parser will let the date be both dateStart and dateEnd. It is equivalent to entering two same dates. -
DateStart will always be earlier than or equal to dateEnd.
-
The limit storage is based on the
Date
. More than one limit for the same period of time is not allowed.
-
-
Limit features’s check:
-
Whenever the user change the recordList information, including adding a record, deleting a record and editing a record, all the limits will be checked automatically by calling the function
autoLimitCheck()
. -
The
autoCheckLimit()
function will look through all the records, calculate the total money for each limit , generate a string which contains all the exceeded limits' information and print the string out to warn the user. -
To get the output, the function will execute a loop, which will execute the
isExceeded()
,getTotalSpend()
andgenerateLimitOutput()
for every limit and combine all the limits' output into one string.
-
-
Limit features' MoneyFlow:
-
Unlike the moneyFlow used by addCommand, the limit moneyFlow input can only be normal real number, which does not have "-" or "+" in front of the number. For example,
m/500
. -
After user input the normal real number, the parser will add a "-" at the beginning of the real number, which makes it a normal moneyFlow.
-
If user input wrong form of limit moneyFlow, the program will throw an error.
-
-
Limit features' parsers:
-
All the limitCommand Parsers are similar to each other. However, there are some differences between different commands. Detailed information will be provided in specific commands.
-
The input given by the user is passed to
ArgumentTokeniser#tokenise
to split the input separated by prefixes. -
This returns a
ArgumentMultiMap
which contains a map with prefixes as keys and their associated input arguments as the value. -
The string associated with
m/
will be checked. If the form is correct. If the form is wrong, the program will throw an error, otherwise it will be constructed as aMoneyFlow
type. -
The string associated with
d/
is then passed intoxxxLimitCommandParser#splitByWhitespace
for further processing and returns an array. This string will be split into two strings and each of them will be constructed as aDate
type variable. If there is only one date string, this date will be set to both dateStart and dateEnd. -
After parsing the two dates, the parser will check whether the dateStart is earlier than dateEnd.
-
Lastly a new limit will be generated with the dateStart, dateEnd and money and return the xxxLimitCommand with the limit.
-
-
-
Monthly Limit:
-
The addMonthlyLimit command is to add a continuous limit always for the current month. The limit will always check the spend of the month according to the current time. For example, if the limit was set to be 200 at April, the limit will check the total spend for April. When the time comes to May, the limit will no longer check April, instead, the limit will check the total spend of May until the last second of May.
-
The user will input only the money they want to set.
-
The parser will make the limit with a special date
01-01-9999
, which is not likely to be used. -
Once the monthly limit is going to be checked, the function
generateThisMonthLimit()
will be called, which will generate a temporary limit according to the current date. Then use this temporary limit to do the limit check and generate output.
-
addLimit feature
Current Implementation
This command is to add a new limit according to the dates input.
The command will read in a limit and store the limit by calling the addLimit()
function.
The user enters two dates (or one date) after the one "d/" index followed by money with m/ index.
-
If there is already a limit with the exactly same dates, the program will throw an error and the limit can not be added.
The following sequence diagram shows how the limit operation works:
deleteLimit feature
Current Implementation
This command is to delete an existing limit.
The command will read in a limit with the input dates and delete the limit with the same dates by calling the deleteLimit
function.
The user enters two dates (or one date) after the one "d/" index.
-
The deleteLimitCommandParser will use the dates and a dummy valid moneyFlow to make it a complete limit.
-
If there is no limit with the same dates, the program will throw an error.
The following sequence diagram shows how the deleteLimit operation works:
editLimit feature
Current Implementation
The editLimit command is to edit an existing limit.
The command will read in a limit and replace the limit with the same dates by calliing the updateLimit()
function.
The user enter two dates after the one "d/" index followed by money with m/ index.
-
If there is no limit with the same dates, the program will throw an error.
The following sequence diagram shows how the limit operation works:
addMonthlyLimit feature
Current Implementation
The addMonthlyLimit command is to add a monthly limit.
The command will read in the monthly limit and store it by calling the addLimit()
function.
The user only enter money after the one "m/" index.
-
The parser will use the special date and the input money to make a complete limit.
-
If there is already a monthly limit, the program will throw an error.
The following sequence diagram shows how the limit operation works:
editMonthlyLimit feature
Current Implementation
The editMonthlyLimit command is to edit the monthly limit.
The command will read in the monthly limit and update the monthly limit by calling the updateLimit()
function.
The user only enter money after the one "m/" index.
-
The parser will use the special date and the input money to make a complete limit.
-
If there is no monthly limit, the program will throw an error.
The following sequence diagram shows how the limit operation works:
deleteMonthlyLimit feature
Current Implementation
The deleteMonthlyLimit command is to delete the monthly limit.
The command will read in the monthly limit and update the monthly limit by calling the deleteLimit()
function.
The user will only enter the command word.
-
The parser will use the special date and a dummy moneyFlow to make a complete limit.
-
If there is no monthly limit, the program will throw an error.
The following sequence diagram shows how the limit operation works:
checkLimit feature
Current Implementation
This feature is to help the user to check all the limits stored inside the limitList. The function will call manualLimitCheck(), which will generate a string that contains all limits' information.
-
When there is no limits inside the limitList, the program will throw an error.
The following sequence diagram shows how the limit operation works:
LimitManualTest ---