Introduction

What is RecruitBook?

RecruitBook is an open-source project born out of a programming module I took in National University of Singapore. It was created in conjunction with my teammates Andrew, Kian Meng, Rachel and Ming Xun.

In this project, I served the role as the team leader by steering the project direction and coordinating the implementation of features in RecruitBook.

RecruitBook is a useful Java desktop application for job agents to better organise the list of available job offers and prospective job candidates. RecruitBook mainly uses a Command Line Interface(CLI) that allows you to interact with specific commands. It also has a Graphical User Interface created with JavaFX and has a codebase of about 10000 lines of code.

Link to GitHub: [RecruitBook]

Summary of contributions

  • Major enhancement #1: added the ability to add/delete job candidates, companies, job offers

    • What it does:
      It allows job agents to organise information of job candidates, companies and job offers on RecruitBook.

    • Justification:
      Enables job agents to record and access required information of job candidates, job offers and companies in RecruitBook efficiently.

  • Minor enhancement #1:
    Added a functionality that changes the logic state of LogicManager

  • Minor enhancement #2:
    Added a functionality that allows user to delete multiple entries and multiple indexes

  • Minor enhancement #3:
    Added the ability to set a password to password protect RecruitBook

  • Code contributed: [Pull Requests]

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.

Adding a candidate / company / job : addc addC addj

addingRB
Figure 1. GUI of Adding entries in RecruitBook

Adds a candidate to the RecruitBook

Format: addc
Supported tags: n/, g/, x/ p/, e/, j/, h/, s/, t/

To start adding candidates in RecruitBook, enter addc in the command line to the start the Add Candidate Interface.

After entering addc you will be prompted the following:

Enter the following details of the candidate in the format:
Parameters: n/NAME g/GENDER x/AGE p/PHONE_NUMBER e/EMAIL a/ADDRESS j/SEEKING_JOB h/HIGHEST_EDUCATION s/EXPECTED_SALARY_PER_MONTH [t/TAG]…​ (Enter 'cancel' to stop adding candidates)
Example: n/John Doe g/M x/21 p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 j/Waiter h/OLEVELS s/1000 t/diabetic t/excuseHeavyLoad

You are now inside the Add Candidate Interface! You can now keep adding candidates by specifying the required fields n/NAME g/GENDER x/AGE p/PHONE_NUMBER e/EMAIL a/ADDRESS j/SEEKING_JOB h/HIGHEST_EDUCATION s/EXPECTED_SALARY_PER_MONTH. Below are some examples for your reference.

To stop adding candidates and exit from the Add Candidate Interface, enter cancel.

Examples:

  • n/Susy Roe g/M x/18 p/91238123 e/susyroe@example.com a/123, Central Boulevard, #01-111, 600123 j/WAITER h/ALEVELS s/1200 t/dyslexic

  • n/Mary Loe g/M x/18 p/82238123 e/maryloe@example.com a/113, South Boulevard, #01-111, 600123 j/WAITER h/OLEVELS s/1000 t/student

Adds a company to the RecruitBook

Format: addC
Supported tags: c/, a/, e/, p/

To start adding companies in RecruitBook, enter addC in the command line to the start the Add Company Interface.

After entering addC you will be prompted the following:

Enter the following details of the company in the format:
Parameters: c/UNIQUE_COMPANY_NAME a/ADDRESS e/EMAIL p/PHONE
(Enter 'cancel' to stop adding companies)
Example: c/KFC a/101, Clementi Ave 2, #01-01 e/kfc@gmail.com p/61231232

You are now inside the Add Company Interface! You can now keep adding companies by specifying the required fields c/UNIQUE_COMPANY_NAME a/ADDRESS e/EMAIL p/PHONE. Below are some examples for your reference.

To stop adding companies and exit from the Add Company Interface, enter cancel.

Examples:

  • c/Aviva a/101, Clementi Ave 2, #01-01 e/aviva@example.com p/61231232

  • c/Subway a/1 Create Way #01-02, NUS University Town e/subway@example.com p/61117111

Adds a job offer to the RecruitBook

Format: addj Supported tags: c/, j/, g/, xr/, h/, s/

To start adding job offers in RecruitBook, enter addj in the command line to the start the Add Job Interface.

After entering addj you will be prompted the following:

Enter the following details of the job in the format:
Parameters: c/COMPANY_NAME j/JOB_TITLE g/GENDER xr/AGE_RANGE h/EDUCATION s/SALARY
(Enter 'cancel' to stop adding jobs)
Example: c/McDonalds j/Cashier g/M xr/20-30 h/OLEVELS s/1200

Company with specified c/COMPANY_NAME has to be added to RecruitBook first!

You are now inside the Add Job Interface! You can now keep adding job offers by specifying the required fields c/COMPANY_NAME j/JOB_TITLE g/GENDER xr/AGE_RANGE h/EDUCATION s/SALARY. Below are some examples for your reference.

To stop adding job offers and exit from the Add Job Interface, enter cancel.

Examples:

  • c/Subway j/Cashier g/M xr/20-30 h/OLEVELS s/1200

  • c/KFC j/Cook g/F xr/20-30 h/OLEVELS s/1400

Deleting candidates / companies / job offers : delete

Deleting candidate(s)

Format: deletec <INDEX>,<INDEX>-<INDEX> …​

  • Deletes the candidate(s) with the specified INDEX(s)

  • You can use <INDEX>-<INDEX> to specify a range of indexes. For example, 1-3 specifies the indexes 1, 2 and 3.

  • This index must be an index number shown in the displayed candidate list.

Use the findc and filterc command to quickly search the candidates you want to delete!

Example to delete candidate(s):

Step 1. findc n/John
(Shows all saved candidates named John)

Step 2. deletec 1,2-3,8
(Deletes the 1st, 2nd, 3rd and 8th candidate on most recent candidate list)

Deleting company(s)

Format: deleteC <INDEX>,<INDEX>-<INDEX> …​

  • Deletes the company(s) with the specified INDEX(s)

  • You can use <INDEX>-<INDEX> to specify a range of indexes. For example, 1-3 specifies the indexes 1, 2 and 3.

  • The index must be an index number shown in the displayed company list.

Use the findC and filterC command to quickly search the candidates you want to delete!
Deleting a company will delete its respective job offers in the CompanyBook!

Example to delete company(s):

Step 1. listC
(Shows all available companies)

Step 2. deleteC 1,6,2-3
(Deletes the 1st, 2nd, 3rd and 6th company in the most recent company list)

Deleting job offer(s)

Format: deletej <INDEX>,<INDEX>-<INDEX> …​

  • Deletes the job(s) with the specified INDEX(s)

  • You can use <INDEX>-<INDEX> to specify a range of indexes. For example, 1-3 specifies the indexes 1, 2 and 3.

  • The index must be an index number shown in the displayed job list.

Use the findj and filterJ command to quickly search the candidates you want to delete!

Example to delete job(s):

Step 1. listj
(Shows all available jobs)

Step 2. deletej 5-4,6
(Deletes the 4th, 5th and 6th job in the most recent job list)

Undo/Redo changes to entries : undo redo

Undo the last change to RecruitBook
Format: undo

You can use undo the previous change to entries RecruitBook such as adding/deletion of candidates,

Example:

Step 1. deletec 1-9
(Delete candidates at specified indexes 1 to 9)

Step 2. undo
(Undo the previous change to RecruitBook, the deletion of candidates from Step 1. )

Redo the last undone change to RecruitBook
Format: redo

You can use redo to quickly redo the last undone step.

Step 1. deleteC 1-2
(Delete companies at specified indexes 1 and 2)

Step 2. undo
(Undo the previous change to RecruitBook, the deletion of companies from Step 1.)

Step 2. redo
(Redo the previous undone change to RecruitBook, the deletion of companies from Step 1.)

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.

Add/Delete Feature

Current Implementation

Candidates

The add/delete mechanism of candidates is facilitated in UniqueCandidateList which stores the added candidates internally as an internalList which is a list of Candidate objects.

It implements Iterable<Candidate>, where it overrides the Iterator, equals and hashCode of the Iterable interface. Additionally, it implements the following operations to support adding/deletion of candidates:

  • UniqueCandidateList#contains(Candidate candidate) — Checks whether a candidate exists inside internalList using Candidate#isSameCandidate to define equality.

  • UniqueCandidateList#add(Candidate candidate) — Adds a unique candidate to internalList. Checks for uniqueness using UniqueCandidateList#contains(Candidate candidate).

  • UniqueCandidateList#remove(Candidate candidate) — Removes the equivalent candidate from internalList.

These operations are exposed in the Model interface as Model#addCandidate(Candidate) and Model#deleteCandidate(Candidate candidate) respectively.

Companies

The add/delete mechanism of companies is facilitated in UniqueCompanyList which stores the added companies internally as an internalList which is a list of Company objects.

It implements Iterable<Company>, where it overrides the Iterator, equals and hashCode of the Iterable interface. Additionally, it implements the following operations to support adding/deletion of companies:

  • UniqueCompanyList#contains(Company company) — Checks whether a company exists inside internalList using Company#isSameCompany to define equality.

  • UniqueCompanyList#add(Company company) — Adds a unique company to internalList. Checks for uniqueness using UniqueCompanyList#contains(Company company).

  • UniqueCompanyList#remove(Company company) — Removes the equivalent company from internalList.

These operations are exposed in the Model interface as Model#addCompany(Company) and Model#deleteCompany(Company company) respectively.

Job Offers

The add/delete mechanism of job offer is facilitated in UniqueJobList which stores the added job offer internally as an internalList which is a list of JobOffer objects.

It implements Iterable<JobOffer>, where it overrides the Iterator, equals and hashCode of the Iterable interface. Additionally, it implements the following operations to support adding/deletion of job offer:

  • UniqueJobList#contains(JobOffer jobOffer) — Checks whether a job offer exists inside internalList using JobOffer#isSameJobOffer to define equality.

  • UniqueJobList#add(JobOffer jobOffer) — Adds a unique job offer to internalList. Checks for uniqueness using UniqueJobOfferList#contains(JobOffer jobOffer).

  • UniqueJobList#remove(JobOffer jobOffer) — Removes the equivalent job offer from internalList.

These operations are exposed in the Model interface as Model#addJobOffer(JobOffer) and Model#deleteJobOffer(JobOffer jobOffer) respectively.

All addition/deletion of the 3 entities (Candidates, Companies, Job Offers) follow the same mechanism.

Given below is an example usage scenario for adding/deleting of these entities and how the adding/deleting mechanism behaves at each step.

Step 1. The user launches the application for the first time.

  1. UniqueCandidateList will be initialised with the list of saved candidates in RecruitBook

  2. UniqueCompanyList will be initialised with the list of saved companies in RecruitBook

  3. UniqueJobList will be initialised with the list of saved job offers.

Step 2. The user executes …​

  1. addc to start the Add Candidate Interface

  2. addC to start the Add Company Interface

  3. addj to start the Add Job Interface

Step 2. The user executes …​

  1. n/John Doe g/M …​ to add a new candidate. AddCandidateCommand calls Model#hasCandidate(Candidate candidate) to check if a duplicate entry exists. Then Model#addCandidate(Candidate candidate) and adds the candidate to the CandidateBook.

  2. c/McDonalds a/101, Teban Gardens, #01-01 …​ to add a new company. AddCompanyCommand calls Model#hasCompany(Company company) to check if a duplicate entry exists. Then Model#addCompany(Company company) and adds the company to the CompanyBook.

  3. c/McDonalds j/Cashier …​ to add a new job offer. AddJobDetailsCommand calls Model#hasJobOffer(JobOffer jobOffer) to check if a duplicate entry exists. Then Model#addJobOffer(JobOffer jobOffer) and adds the job offer to the CompanyBook.

Step 4. The user executes …​

  1. deletec 1,3-4 to delete multiple candidates. DeleteCandidateCommand calls Model#removeCandidate(Candidate candidate) for the candidates listed at index 1, and 4.

  2. deleteC 1,3-4 to delete multiple companies. DeleteCompanyCommand calls Model#removeCompany(Company company) for the companies listed at index 1, and 4.

  3. deletej 1,3-4 to delete multiple job offers. DeleteJobOfferCommand calls Model#deleteJobOffer(JobOffer jobOffer) for the job offers listed at index 1, and 4.

Below in Figure 9. is a sequence diagram of how adding a candidate works in RecruitBook and also serves to depict the adding mechanism for job offers and companies due to their similarity.

AddSequenceDiagram
Figure 2. Sequence Diagram of adding a candidate

Design Considerations

Aspect: How add/delete feature executes
  • Alternative 1 (current choice): Start an adding interface. Users can continually add entries for the same object until they enter 'cancel'

    • Pros: User can keep adding multiple entries of the same object without having to entering the addc, addC or `addj.

    • Cons: Not very convenient for user if he/she just needs to add one entry.

  • Alternative 2: Enter command_word and argument

    • Pros: Adding entries of specific objects is straightforward. Enter the respective command word and the respective details

    • Cons: Entering the command word becomes a hassle when adding a large number of entries ===== Aspect: Data structure to support the add/delete feature

  • Alternative 1 (current choice): Create a new list object to store objects e.g. UniqueCompanyList

    • Pros: Easy to implement, allows for manipulation of data within the data structure (e.g) sorting. Also allows us to define a stricter form duplicity between objects.

    • Cons: Storing objects in a list makes certain operations O(n) e.g. delete operation searches the whole list to find the exact object to remove from list.

  • Alternative 2: Use a HashTable to store objects

    • Pros: Delete operation is O(1). Checking for duplicates before adding is also O(1) since HashTable does not allow duplicates

    • Cons: Can’t really manipulate data in the HashTable.