Property Rental Manager (PRM) is a desktop application that helps property agents manage, filter and monitor single owner rental units for appropriate tenants. This application uses Command Line Interface (CLI) and is able to display information quickly with minimal latency. Also, the application is tailored to Singapore context.
add -property
delete -property
list -property
list -property TAG
check -property
add -client
delete -client
list -client
list -client TAG
check -client
pair
unpair
list -pair
list -pair -short
list -everything
find
help
quit
PropertyRentalManager.jar
from here.cd [PATH_TO_JAR_DIRECTORY]
java -jar PropertyRentalManager.jar
Note:
-property
and -client
indicates whether the command is for property or client.add -property
Adds a new property into property list, along with Singapore address and unit-type validations. Also, duplicate property entries of the same address will not be accepted.
Format: add -property n/NAME a/ADDRESS p/PRICE t/TYPE
Example: add -property n/Ash Ketchun a/25A Pallet Town, S121111 p/1600 t/LP BGL
Expected Output:
Adding a property with the following information:
Landlord: Ash Ketchun
Address: 25A Pallet Town, S121111
Renting Price: SGD1600/month
Unit Type: LP Bungalow
The descriptions of add -property
PARAMETERS are as follows:
NAME
: Name of property owner (Landlord)ADDRESS
: Singapore Address (including postal code)PRICE
: Rental Price per Month for property (SGD)TYPE
: Type of property (e.g. HDB, Condominium, etc)As there are validations involved, some PARAMETERS must adhere to specific formats as shown below:
For valid ADDRESS
, a valid Singapore address must be provided with the following format and details:
--------------------------------------------------------------------------------
Format:
[BLOCK NUMBER] [STREET NAME], S[POSTAL CODE]
[BLOCK NUMBER] [STREET NAME] #[unit level]-[unit number], S[POSTAL CODE]
[BLOCK NUMBER] [STREET NAME] #[unit level]-[unit number] [building name], S[POSTAL CODE]
--------------------------------------------------------------------------------
Example:
60 Aria Street, S602580
101 Marlow Street #12-05, S059020
101 Marlow Street #12-05 Clife Parkview, S059020
--------------------------------------------------------------------------------
Note:
1. Format requires single space between [DETAILS] (space sensitive).
2. [DETAIL] must be provided; [detail] is optional.
3. For landed property, treat [Block Number] as its unit number.
4. Any deviation from format will lead to invalid address.
--------------------------------------------------------------------------------
For valid TYPE
, one of the 15 valid Singapore-based unit type labels (App Pre-Defined) must be provided with the following format:
Format: t/<label>
--------------------------------------------------------------------------------
HDB Labels:
<HDB 2> for HDB 2-Room Flexi
<HDB 3> for HDB 3-Room
<HDB 4> for HDB 4-Room
<HDB 5> for HDB 5-Room
<HDB 3Gen> for HDB Third-Generation
<HDB ExFlat> for HDB Executive Flat
<HDB DBSS> for HDB Design, Build and Sell Scheme (DBSS) Flat
<HDB ExMsn> for HDB Executive Maisonette
<HDB Jumbo> for HDB Jumbo Flat
<HDB TH> for HDB Terrace House
--------------------------------------------------------------------------------
Condominium Label:
<Condo> for Condominium
--------------------------------------------------------------------------------
Penthouse Label:
<PH> for Penthouse
--------------------------------------------------------------------------------
Landed Property Labels
<LP TH> for LP Terrace House
<LP SDH> for LP Semi-Detached House
<LP BGL> for LP Bungalow
--------------------------------------------------------------------------------
Lastly, for valid PRICE
, a positive integer must be provided.
There is also another validation which checks for mismatch between address format and unit type of property. Certain unit types will require specific address format. Please refer to the description below:
1. Unit type with <LP> must not have #[unit level]-[unit number] in address.
Format:
[BLOCK NUMBER] [STREET NAME], S[POSTAL CODE]
2. Unit type without <LP> must have #[unit level]-[unit number] in address.
Format:
[BLOCK NUMBER] [STREET NAME] #[unit level]-[unit number], S[POSTAL CODE]
[BLOCK NUMBER] [STREET NAME] #[unit level]-[unit number] [building name], S[POSTAL CODE]
Note: HDB Terrace House (special case) is not restricted by any format.
DISCLAIMER:
Currently, there are some illogical inputs allowed by the application as shown below. Although validation can be done to prevent such cases, such validations will hinder normal operation and thus not implemented.
delete -property
Deletes the specified property from the property list and subsequently deletes any pairings involving that property.
Format: delete -property i/PROPERTY_INDEX
Example: delete -property i/2
Expected Output:
Deleting property with the following information:
Landlord: Bob Tan Bee Bee
Address: 25 Lower Kent Ridge Rd, S119081
Renting Price: SGD1000/month
Unit Type: LP Bungalow
list -property
Lists all properties present in the list
Example:
list -property
Assuming that only 1 property is present in the list.
Expected output:
1. Landlord Name: Bob Tan Bee Bee
Property Address: 25 Lower Kent Ridge Rd, S119081
Property Rental Price: 1000
Unit Type: LP Bungalow
--------------------------------------------------------------------------------
There is 1 property in this list
list -property TAG
Lists only selected details of all the properties, depending on the TAG. The commands for these are -
list -property a/
This is for addresseslist -property n/
This is for nameslist -property p/
This is for priceslist -property t/
This is for unit typeslist -property -short
This is for the shorthand version(displays addresses, prices and unit types)list -property p/
1. 1000
--------------------------------------------------------------------------------
2. 2000
--------------------------------------------------------------------------------
There are 2 properties in this list
check -property
Displays the information of the specified property, along with the clients the property is being rented by, if any.
Format: check -property i/PROPERTY_INDEX
Example: check -property i/2
Expected Output:
Showing check results for this property:
Landlord: Bob Tan Bee Bee
Address: 25 Lower Kent Ridge Rd, S119081
Renting Price: SGD1000/month
Unit Type: LP Bungalow
Here are the tenants renting this property:
1. Client: Joseph Joestar
Contact Number: 83625471
Email: jojofirst@jmail.com
Budget: SGD9000/month
Number of entries in the list: 1
add -client
Adds a new client into client list, along with Singapore contact number and basic email format validations. Also, duplicate client entries of the same name, contact number or email will not be accepted.
Format: add -client n/NAME c/CONTACT_NUMBER e/EMAIL b/BUDGET_MONTH
Example: add -client n/Gary Oaks c/90876543 e/garyoaks@example.com b/1550
Expected Output:
Adding a client with the following information:
Client: Gary Oaks
Contact Number: 90876543
Email: garyoaks@example.com
Budget: SGD1550/month
Note: Email is optional so excluding e/EMAIL
or having e/BLANK
is acceptable.
The descriptions of add -client
PARAMETERS are as follows:
NAME
: Name of client (Person looking for a property to rent)CONTACT_NUMBER
: Contact number of clientEMAIL
: Email of clientBUDGET_MONTH
: Budget per month (SGD) of clientAs there are validations involved, some PARAMETERS must adhere to specific formats as shown below:
For valid CONTACT_NUMBER
, a Singapore contact number (no extension) must be provided. A Singapore contact number starts with a 6
,8
or 9
, followed by 7 remaining digits.
For valid EMAIL
, it must adhere to the RFC 5322 Official Email Standard.
For valid BUDGET_MONTH
, a positive integer must be provided.
delete -client
Deletes the specified client from the client list and subsequently deletes any pairings involving that client.
Format: delete -client i/CLIENT_INDEX
Example: delete -client i/3
Expected Output:
Deleting client with the following information:
Client: Doja Cat
Contact Number: 93437878
Email: doja88@example.com
Budget: SGD2000/month
list -client
Lists all the clients present in the list
Example: list -client
Assuming that only 1 client is present in the list.
Expected output:
1. Client Name: Doja Cat
Client Contact Number: 93437878
Client Email: doja88@example.com
Client Budget: 2000
--------------------------------------------------------------------------------
There is 1 client in this list
list -client TAG
List only selected details of all the clients, depending on TAG. The commands for these are-
list -client c/
This is for contact numberslist -client b/
This is for budgetslist -client n/
This is for nameslist -client e/
This is for e-mailslist -client -short
This is for the shorthand version(displays just names and budgets)list -client n/
1. Doja Cat
--------------------------------------------------------------------------------
2. Doja Cat The Second
--------------------------------------------------------------------------------
There are 2 clients in this list
check -client
Displays the information of the specified client, along with the property the client is renting, if any.
Format: check -client i/CLIENT_INDEX
Example: check -client i/5
Expected Output:
Showing check results for this client:
Client: Doja Cat
Contact Number: 93437878
Email: doja88@example.com
Budget: SGD2000/month
Here is the property this client is renting:
Landlord: Bob Tan Bee Bee
Address: 25 Lower Kent Ridge Rd, S119081
Renting Price: SGD1000/month
Unit Type: LP Bungalow
pair
Pairs the client to the specified property, to record that the client is renting the property.
Format: pair ip/PROPERTY_INDEX ic/CLIENT_INDEX
PROPERTY_INDEX
and CLIENT_INDEX
must be indexes present in the client list and property list respectively.Example: pair ip/1 ic/5
Expected Output:
Pairing the following client and property:
Kujou Jotaro and 25 Lower Kent Ridge Rd, S119081
unpair
Unpairs the client from the specified property, to record that the client is no longer renting the property.
Format: unpair ip/PROPERTY_INDEX ic/CLIENT_INDEX
PROPERTY_INDEX
and CLIENT_INDEX
must be indexes present in the client list and property list respectively.Example: unpair ip/1 ic/5
Expected Output:
Unpairing the following client and property:
Kujou Jotaro and 25 Lower Kent Ridge Rd, S119081
list -pair
Lists, in no particular order all information about clients and properties that have been paired.
The format for each such pair is -
Example: list -pair
Expected output:
Client:
Client Name: Doja Cat
Client Contact Number: 93437878
Client Email: doja88@example.com
Client Budget: 2000
Property:
Landlord Name: Bob Tan Bee Bee
Property Address: 25 Lower Kent Ridge Rd, S119081
Property Rental Price: 1000
Unit Type: LP Bungalow
list -pair -short
Lists, in no particular order shortened information about clients and properties that have been paired.
The format for each such pair is -
Example list -pair -short
Expected output:
Client:
Client Name: Doja Cat
Client Budget: 2000
Property:
Property Address: 25 Lower Kent Ridge Rd, S119081
Unit Type: LP Bungalow
Property Rental Price: 1000
list -everything
Lists all information about every client and every property in the list.
Assume 1 client and 1 property is in the list and they are paired.
Example list -everything
Expected output:
1. Landlord Name: Bob Tan Bee Bee
Property Address: 25 Lower Kent Ridge Rd, S119081
Property Rental Price: 1000
Unit Type: LP Bungalow
--------------------------------------------------------------------------------
There is 1 property in this list
--------------------------------------------------------------------------------
Pairs:
Client:
Client Name: Doja Cat
Client Contact Number: 93437878
Client Email: doja88@example.com
Client Budget: 2000
Property:
Landlord Name: Bob Tan Bee Bee
Property Address: 25 Lower Kent Ridge Rd, S119081
Property Rental Price: 1000
Unit Type: LP Bungalow
--------------------------------------------------------------------------------
There is 1 pair in this list
find
This feature allows for the queried text to be filtered. The queried text is not constrained within any field. This means that if the queried text matches the name of the first list and the address of second list, both entries will be counted as a match.
Format:
find -CLIENT/PROPERTY f/QUERY_TEXT
3 fields are required to be entered for successful operation:
find
-
.f/
, enter the text that will be searched through.Example:
find -property f/Bob The Builder
find -client f/Amos
The 1st command above search through the property list for any matches with Bob the Builder
while the 2nd command
search through the client list for any matches with Amos
.
Expected Output:
1. Landlord Name: Bob The Builder
Property Address: 25A Lower Kent Ridge Rd, S119081
Property Rental Price: 1000
Unit Type: LP Bungalow
--------------------------------------------------------------------------------
1. Client Name: Amos
Client Contact Number: 91283543
Client Email: abc@examplemail.com
Client Budget: 1500
--------------------------------------------------------------------------------
help
By entering the help
command, users can see a condense version of the list of commands available while using the application. To invoke the help command, type help
without any additional text.
The list of commands will be as show below:
The list of available commands are stated below:
--------------------------------------------------------------------------------
LIST COMMAND
--------------------------------------------------------------------------------
list -client
list -property
list -everything
list -client <TAG>
list -property <TAG>
where <TAG> is replaced by the tag you would like to look into.
For example: list -client n/
--------------------------------------------------------------------------------
ADD COMMAND
--------------------------------------------------------------------------------
add -client n/<CLIENT_NAME> c/<CONTACT_NUMBER> e/<EMAIL> b/<BUDGET>
add -property n/<LANDLORD_NAME> a/<ADDRESS> p/<RENTAL_PRICE> t/<UNIT_TYPE>
where the tags (represented by brackets) are replaced as accordingly
Note that email address is optional
--------------------------------------------------------------------------------
DELETE COMMAND
--------------------------------------------------------------------------------
delete -client i/<INDEX>
delete -property i/<INDEX>
where <INDEX> represents the index of entity to be deleted.
--------------------------------------------------------------------------------
PAIR/UNPAIR COMMAND
--------------------------------------------------------------------------------
pair ip/<INDEX> ic/<INDEX>
unpair ip/<INDEX> ic/<INDEX>
where <INDEX> represents the index of property and client to pair together with.
--------------------------------------------------------------------------------
CHECK COMMAND
--------------------------------------------------------------------------------
check -client i/<INDEX>
check -property i/<INDEX>
where <INDEX> refers to the index of the client or property to check for.
--------------------------------------------------------------------------------
FIND COMMAND
--------------------------------------------------------------------------------
find -client f/<QUERY_TEXT>
find -property f/<QUERY_TEXT>
where <QUERY_TEXT> refers to the text to search for in either client or property.
--------------------------------------------------------------------------------
quit
Leaves the application with a goodbye message
Example: quit
Expected output:
Goodbye :). See you soon!
The loading of the data occurs during the start of the program, before any command is entered. There will be 3 different loading operations:
Clients will be added to a list containing the clients if the data stored in client.txt
conforms to the format.
Before appending into the list, it will also be passed through a check to ensure each of the entity is in the right
format. Should the data fail to be in the correct format, it won’t be stored into list.
Similar operation can be applied to the property list
where the data is stored in property.txt
. The entries will
also be checked that it was stored in the right format and each of the entries conforms to the requirement before it’s
added into the list containing all the property.
The pairing list
will be the last to load. This is done so to verify that the client and property is within the
Client’s list and Property’s list respectively. In the scenario where either of the entries is not in, the pair
would not be loaded and will be considered as incorrect data inputted.
Saving of data occurs in 3 instances of operation:
When client, property and pairing is added, text will be appended to the text file as shown below:
Client
: Appends CLIENT_NAME | CLIENT_CONTACT_NUMBER | CLIENT_EMAIL | CLIENT_BUDGET
to client.txt
.An example of the client text file is as shown below:
Property
: Appends LANDLORD_NAME | PROPERTY_ADDRESS | PROPERTY_RENTAL_RATE | PROPERTY_UNIT_TYPE
to property.txt
.An example of the property text file is as shown below:
Pair
: Appends [CLIENT_NAME | CLIENT_CONTACT_NUMBER | CLIENT_EMAIL | CLIENT_BUDGET] : [LANDLORD_NAME |
PROPERTY_ADDRESS | PROPERTY_RENTAL_RATE | PROPERTY_UNIT_TYPE]
to pair.txt
.An example of the pairing text file is as shown below:
Updating of data occurs in 6 instances of operation:
delete -client
command invokeddelete -property
command invokedunpair
command invokedclient.txt
property.txt
pair.txt
When the updating operation occurs, it will iterate through the list, depending on which list has been updated. While iterating through the list, the program will convert each entry into the correct format and store in their respective text files.
Since the data is stored in a text file, it allows for user to manually key in the entries and will be loaded when the program is re-ran.
This is how the entries should be stored :
Client: CLIENT_NAME | CLIENT_CONTACT_NUMBER | CLIENT_EMAIL | CLIENT_BUDGET
Property: LANDLORD_NAME | PROPERTY_ADDRESS | PROPERTY_RENTAL_RATE | PROPERTY_UNIT_TYPE
Pairing: [CLIENT_NAME | CLIENT_CONTACT_NUMBER | CLIENT_EMAIL | CLIENT_BUDGET] : [LANDLORD_NAME | PROPERTY_ADDRESS |
PROPERTY_RENTAL_RATE | PROPERTY_UNIT_TYPE]
Note that if the entries are stored incorrectly, the program will automatically remove the entries from the text file during the next run of the program. This is done so to prevent overcrowding of junk data.
add -property n/NAME a/ADDRESS p/PRICE t/TYPE
delete -property i/PROPERTY_INDEX
list -property
list -property a/
list -property n/
list -property b/
list -property t/
list -property -short
check -property i/PROPERTY_INDEX
Find Property: find -property f/QUERY_TEXT
add -client n/NAME c/CONTACT_NUMBER e/EMAIL b/BUDGET_MONTH
delete -client i/CLIENT_INDEX
list -client
list -client n/
list -client c/
list -client b/
list -client e/
list -client -short
check -client i/CLIENT_INDEX
Find Client: find -client f/QUERY_TEXT
List Everything: list -everything
pair ip/PROPERTY_INDEX ic/CLIENT_INDEX
unpair ip/PROPERTY_INDEX ic/CLIENT_INDEX
list -pair
List Pairs Short: list -pair -short
help