Zhong Heng - Project Portfolio Page
Project: CafeCRTL
Overview - CaféCTRL is a software engineering project for CS2113. The user interacts with the application through CLI. It has around 6 kLoC, and it is done in a team of 5.
Value Proposition - CaféCRTL aims to optimize managing of inventory and cash flow in a restaurant. Our CLI platform empowers Café proprietors to streamline inventory and menu management.
Target User - Café proprietors who prefer typing on CLI than any other interaction method and are seeking for a software solution to optimize the management of their café’s operations.
Summary of Contributions
Code Contribution - Follow here to see code written by me
Feature implemented
- List Menu
Function: Allow user to view all dishes added to menu
Command Format:list_menu
- Add Order
Function: Adds an order consisting of dishes off the menu to an order list
Command Format:add_order name/DISH_NAME qty/DISH_QTY
Error Handling: This command is able to detect missing argument tag, missing argument, wrong argument type, empty argument type. It will then output specific error message to prompt the user to enter the correct Command format.
Highlights: This feature required the creation of 5 classes to work together to perform the intended task. This really tested my understanding of OOP and planning to minimise overlap and manage the interactions between these classes. - Day Change Commands - Added the ability to traverse through different days.
Function: Next Day and Previous Day commands allow the user to traverse through different days to capture sales, simulating a sales system used in a restaurant.
Command Format:next_day
andprevious_day
Error Handling: Next Day command ensures that the intended traversed day has a proper orderList, preventing a NullPointerException. Previous Day command will prevent the user from traversing to days before Day 1.
Highlights: This feature required strong understanding of ArrayLists as it worked with multiple layers of ArrayLists as well as different copies of the same ArrayList that needed to be synchronised.
- Hashing text save files - Implemented Hashing for text files used to save app user input data.
What it does: Hashes the text files generated from user actions (such as Menu, Sales and PantryStock), that will be accessed to load relevant data back into the application. When tampering has been detected, the syntax is shown to the user to ensure that the user is able to adjust the data saved while maintaining the format that the application is able to process.
Justification: This was done to detect tampering of these save files which may potentially crash or induce unexpected behaviour from the application when the data is read and loaded into the application.
Highlights: This feature relied on knowledge learnt in CS2040C, Data Structures and Algorithms, to come up with the idea, understand how hashing works and how to implement this feature.
Credits: https://www.geeksforgeeks.org/java-string-hashcode-method-with-examples/
Implemented in PRs: #283, #324
Enhancements Implemented
- Main
Implemented skeleton code for Main for other teammates to use. - Parser
Implemented skeleton class for Parser for other teammates to use. I refactored Parser such that only relevant parameters are passed into commands when executing. This removes bloat from the Command class and leaves the work to the Parser class. - Command
Implemented skeleton class for Command for other teammates to use. I refactored existing Command classes such that only relevant parameters are passed into commands when executing. - Order
Implemented class for Order, OrderList, Sales and Chef. These classes are accessed by Pantry and Menu for features relating to Orders and Sales, accounting for 1/3 of the application features. - Printing
Implemented the printing style of auto formatting box used bylist_menu
,view_stock
andshow_sales
. - Order
Implemented class for CurrentDate. This class is used to facilitate the day changes and sales.
Contributions to UG
- List Menu
- Add Order
- Next Day
- Previous Day
Contributions to DG
- List Menu
- Add Order
- Next Day
- Previous Day
Other Contributions to Team-based Task
- Maintain issue tracker
- Bug testing for the application and providing detailed steps to recreate found bugs.
- Implemented bug fixes for PED bugs
#212,
#278,
#297
Review/Mentoring Contributions
- Reviewed and approved PRs. Some examples of PR reviewed: #321, #296, #57, #96
- Assist teammates with their acclimation to the project’s workflow, particularly using GitHub’s branching workflow.
Contributions beyond the Project Team
- Reported a total of 16 program bugs for another team during the module’s PED.