Tan Yu Li, James's Project Portfolio Page
Project: HairStyleX
HairstyleX helps managers for budding neighborhood hair salons to manage clients, hairdressers, and appointments. It is optimized for CLI users so that frequent tasks can be done faster by typing in commands. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 20 kLoC.
Given below are my contributions to the project.
Summary of Contributions
Code contributed
Access my RepoSense link to view the code that I have contributed.
Enhancements implemented
- Create Client and Hairdresser class: Designed and created
Client
andHairdresser
classes to be used in HairStyleX (Pull request #79)- What it does: Defines the blueprint and rules of creating clients and hairdressers in HairStyleX
- Justification: These classes are fundamental to the entire project, since they define how clients and hairdressers are to be stored, and what attributes they should have.
- Highlights:
- This was the first change made from the original AddressBook-3, so there was a great importance of these classes as the work of my other team members depended heavily on these.
- Careful consideration of good OOP design was made when creating these classes. Since
Client
s andHairdresser
s are bothPerson
s, thePerson
class was made to be an abstract class, withClient
andHairdresser
inheriting fromPerson
.Person
encapsulated fields which will be essential to both entities, whileClient
s andHairdresser
s encapsulated other fields which would be important for their own classes. - The methods used to define equality was also carefully considered, since they will be used to prevent creation of duplicate entities in HairStyleX.
- In addition, all fields were carefully designed to include regex tests for the most appropriate strings to be accepted.
- Create CRUD command for Appointments: Designed and created
Add
,Edit
,Delete
andList
commands forAppointments
(Pull request #117, #119)- What it does: Encapsulates the logic that makes changes to the
Model
andStorage
classes whenever appointments are manipulated in HairStyleX. - Justification: These commands are essential to ensuring that appointments are stored and saved correctly in HairStyleX whenever a user manipulates them.
- Highlights:
- The creation of these commands entailed creating and designing many more appointment-related classes and methods in the
model
andstorage
packages to ensure that the data will be handled in the correct manner. - This was the first version of
Appointment
commands that allowed us to complete a minimum viable product by v1.2. As such, it was a very basic implementation that did not account for appointment clashes. - Nonetheless, this basic implementation of appointment commands allowed my fellow teammates Nicholas, YiFan and Yao Yuan to implement more advanced features that aids users in scheduling and manipulating appointments.
- The creation of these commands entailed creating and designing many more appointment-related classes and methods in the
- What it does: Encapsulates the logic that makes changes to the
- Refactor Index to Id: Changed all user operations to work on
Id
instead of the defaultIndex
(Pull request #150)- What it does: enforces the user to identify
Client
s,Hairdresser
s andAppointment
s by their uniqueId
instead of the default list index that is shown in AddressBook-3. - Justification: Initially, we intended to follow the original AddressBook-3, where each
Person
would be identified by its shown index in the list shown in the GUI. However, we came to the realisation this approach would confuse the user during this scenario:- When the user searches for an entity with filters, the filtered list would show indices that are not corresponding to the original list. As such, the user might erroneously key in the wrong index for his/her selected entity. To reduce potential confusion for users, we decided that each entity should be identified by a unique ID within its own class, and that this should be displayed to the user and be the primary way of identifying entities for the purposes of editing, deleting, etc.
- Highlights:
- This refactor affected all existing commands that previously used
Index
. Furthermore, since every entity now has anId
field, it required changes to the existingStorage
classes in order for each entity to record its ownId
, and it also required a global counter for the respectiveId
s so that the nextId
can be generated without collisions. - In order for each entity to have a unique
Id
upon instantiation, a finalIdCounter
class was created to keep track of each entity’s currentId
and increment it whenever anId
is generated. This class is a singleton, and only one instance can exist at any point in time.
- This refactor affected all existing commands that previously used
- What it does: enforces the user to identify
- Testing: Create tests for client related commands to increase coverage from 48% to 56% (Pull request #280)
Contributions to the User Guide
- Provided a detailed guide supplemented with screenshots and examples for general commands such as
help
,clear
,exit
andprint
. (Pull request #265) - Contributed to Introduction, Quick Start, and About sections to give an overview about HairStyleX and guide new users on how to interpret the User Guide. (Pull request #192)
- Added FAQ and Command Summary Sections to address common questions and give a quick overview of all command syntax. (Pull requests #192, #43)
Contributions to the Developer Guide
- Added implementation details of the Id and IdCounter classes (Pull request #170)
- Recreated existing diagrams and updated implementation details for Logic Component (Pull request #170)
- Update product scope (Pull request #42)
- Add use cases (Pull request #76)
Contributions to the team-based tasks
- Set up github organisation and repo
- Set up README section on github (Pull request #55)
- Managed and allocate tasks for v1.1
- Refactored all instances of
AddressBook
toHairStyleX
(Pull request #255) - Upload screenshots for v1.3 demo
Review/mentoring contributions
- PRs reviewed (with non-trivial review comments): #184
Contributions beyond the project team
- Reported 6 bugs in group F13-4’s tP during mock PE