forked from nus-cs2113-AY2324S2/tp
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #257 from XavierLiau34/master
Added Quote Command
- Loading branch information
Showing
25 changed files
with
753 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Xavier Liau - Project Portfolio Page | ||
|
||
## Project: BinBash | ||
|
||
BinBash is a CLI-based **Inventory Management System** that is targeted at small retail business owners. | ||
BinBash aims to make the inventory management process streamlined, error-free and highly efficient, through its | ||
extensive suite of inventory management features. | ||
BinBash also enables users to gain valuable insights into their inventory, through comprehensive profit reporting | ||
features which facilitate efficient sales and trends analysis. | ||
|
||
Given below are my contributions to the project. | ||
|
||
## Summary of Contributions | ||
|
||
**New Feature:** Implemented `quote` command | ||
- What it does: Provides a randomly generated quote upon input of the `quote` command. | ||
- Justification: Enhances user experience by adding an entertaining and user-friendly feature. | ||
- Highlights: The implementation generates quotes from a curated database and ensures random selection for variety. | ||
|
||
**Implemented JUnit tests for several commands and parsers** | ||
|
||
- What it does: Adds comprehensive test coverage, ensuring that the program behaves as expected under various scenarios and edge cases. | ||
- Justification: Testing is a crucial aspect of software development, ensuring the reliability and correctness of the codebase. | ||
By adding JUnit tests, we enhance the robustness of the application and reduce the likelihood of introducing regressions in future changes. | ||
Increasing test coverage also helps identify and address potential bugs or issues, improving the overall quality of the application. | ||
Comprehensive testing is the ultimate aim. | ||
- Highlights: The JUnit tests cover different aspects, including testing for adding single items, multiple items, | ||
item details correctness, handling duplicate item names, and handling zero quantity restocking, so on and so forth. | ||
|
||
**Contributions to the User Guide**: | ||
`quote` command section. | ||
|
||
* **Contributions to the Developer Guide**: | ||
* Logging section. | ||
* BinBashLogger Class subsection. | ||
* Usage subsection. | ||
* Log Output subsection | ||
* Product Scope section. | ||
* Target User Profile subsection. | ||
* Value Proposition subsection. | ||
* Glossary Section | ||
* Launch and Shutdown section. | ||
|
||
* **Community Engagement** | ||
* Conducted testing for other teams' applications and provided bug reports. | ||
|
||
* **Code contributed**: [RepoSense link](https://nus-cs2113-ay2324s2.github.io/tp-dashboard/?search=XavierLiau34&breakdown=true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# PureUsagi's Project Portfolio Page | ||
# Ng Jun Han's Project Portfolio Page | ||
|
||
## Project: BinBash | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package seedu.binbash.command; | ||
|
||
import seedu.binbash.inventory.ItemList; | ||
import seedu.binbash.quotes.Quotes; | ||
import seedu.binbash.logger.BinBashLogger; | ||
|
||
public class QuoteCommand extends Command { | ||
|
||
public QuoteCommand() { | ||
commandLogger = new BinBashLogger(QuoteCommand.class.getName()); | ||
commandLogger.info("Creating Quote Command..."); | ||
} | ||
|
||
@Override | ||
public boolean execute(ItemList itemList) { | ||
executionUiOutput = Quotes.getRandomQuote(); | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package seedu.binbash.quotes; | ||
|
||
import java.util.Random; | ||
|
||
public class Quotes { | ||
public static final String[] CUSTOM_MESSAGES = { | ||
"Hope you have a good day of inventory management.", | ||
"Have a nice day!", | ||
"Welcome back to BinBash!", | ||
"Make today amazing!", | ||
"Enjoy your time with BinBash!", | ||
"Wishing you a productive day!", | ||
"Get ready for some BinBash fun!", | ||
"Let's make today great!", | ||
"Time to conquer your inventory!", | ||
"Sending positive vibes your way!", | ||
"Welcome to another BinBash adventure!", | ||
"Stay positive and keep BinBashing!", | ||
"Today's a good day to organize!", | ||
"You've got this!", | ||
"Hope your day is BinBash-tastic!", | ||
"Get ready to rock your inventory!", | ||
"BinBash is here to help!", | ||
"Hope you find everything you need!", | ||
"Have a wonderful day ahead!", | ||
"Start your day with a smile!", | ||
"Sending you BinBash blessings!", | ||
"Let's make magic happen!", | ||
"Embrace the BinBash journey!", | ||
"You're awesome, just like BinBash!", | ||
"Seize the day with BinBash!", | ||
"Welcome to BinBash excellence!", | ||
"Time to unleash your inventory power!", | ||
"Hope you have a blast with BinBash!", | ||
"Today's a good day to BinBash!", | ||
"Stay motivated and BinBash on!", | ||
"Enjoy every moment with BinBash!", | ||
"Make today memorable!", | ||
"Let's create some BinBash miracles!", | ||
"Believe in yourself and BinBash!", | ||
"Welcome to the world of BinBash!", | ||
"Today's forecast: BinBash brilliance!", | ||
"BinBash wishes you a fantastic day!", | ||
"May your day be filled with BinBash joy!", | ||
"Let's make today legendary!", | ||
"Stay positive and BinBash strong!" | ||
}; | ||
|
||
private static final Random RANDOM = new Random(); | ||
|
||
// Private constructor to prevent instantiation | ||
private Quotes() {} | ||
|
||
public static String getRandomQuote() { | ||
int randomIndex = RANDOM.nextInt(CUSTOM_MESSAGES.length); | ||
return CUSTOM_MESSAGES[randomIndex]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.