diff --git a/docs/Diagrams/Images/Promotion/AddPromotion.png b/docs/Diagrams/Images/Promotion/AddPromotion.png index a2b0c5236..8848725e2 100644 Binary files a/docs/Diagrams/Images/Promotion/AddPromotion.png and b/docs/Diagrams/Images/Promotion/AddPromotion.png differ diff --git a/docs/Diagrams/Images/Promotion/AddPromotion_ClassDiagram.png b/docs/Diagrams/Images/Promotion/AddPromotion_ClassDiagram.png index a21382bbe..f371d4c3d 100644 Binary files a/docs/Diagrams/Images/Promotion/AddPromotion_ClassDiagram.png and b/docs/Diagrams/Images/Promotion/AddPromotion_ClassDiagram.png differ diff --git a/docs/Diagrams/Images/Promotion/DeletePromotion.png b/docs/Diagrams/Images/Promotion/DeletePromotion.png index 850afc697..2bfc491e4 100644 Binary files a/docs/Diagrams/Images/Promotion/DeletePromotion.png and b/docs/Diagrams/Images/Promotion/DeletePromotion.png differ diff --git a/docs/Diagrams/Images/Promotion/ListPromotion_SequenceDigram.png b/docs/Diagrams/Images/Promotion/ListPromotion_SequenceDigram.png index bac03a57e..c079699e7 100644 Binary files a/docs/Diagrams/Images/Promotion/ListPromotion_SequenceDigram.png and b/docs/Diagrams/Images/Promotion/ListPromotion_SequenceDigram.png differ diff --git a/docs/Diagrams/Images/Promotion/Promotion_SequenceDigram.png b/docs/Diagrams/Images/Promotion/Promotion_SequenceDigram.png index c2b6b6090..1553fdaed 100644 Binary files a/docs/Diagrams/Images/Promotion/Promotion_SequenceDigram.png and b/docs/Diagrams/Images/Promotion/Promotion_SequenceDigram.png differ diff --git a/docs/Diagrams/PUML files/Promotion/AddPromotion.puml b/docs/Diagrams/PUML files/Promotion/AddPromotion.puml index 04d88a446..b7d63aa60 100644 --- a/docs/Diagrams/PUML files/Promotion/AddPromotion.puml +++ b/docs/Diagrams/PUML files/Promotion/AddPromotion.puml @@ -6,10 +6,10 @@ mainframe sd AddPromotion autoactivate on participant ":PromotionCommand" as PromotionCommand -participant "<>\nPromotionlist" as Promotionlist +participant ":Promotionlist" as Promotionlist participant ":TextUi" as TextUi -participant "<>\nItemlist" as Itemlist -participant "<>\n Promotion" as Promotion +participant ":Itemlist" as Itemlist +participant ":Promotion" as Promotion PromotionCommand -> Promotionlist : addPromotion(promotion) Promotionlist -> Itemlist : isItemExist(itemName) diff --git a/docs/Diagrams/PUML files/Promotion/AddPromotion_ClassDiagram.puml b/docs/Diagrams/PUML files/Promotion/AddPromotion_ClassDiagram.puml index ab2d49744..b1f71ab6f 100644 --- a/docs/Diagrams/PUML files/Promotion/AddPromotion_ClassDiagram.puml +++ b/docs/Diagrams/PUML files/Promotion/AddPromotion_ClassDiagram.puml @@ -14,11 +14,11 @@ class Promotionlist #Honeydew { + getIndex(promotion : Promotions) + itemIsOnPromo(itemName: String) + isLeapYear(year: Int) - + addPromotion((promotion : Promotions) + + addPromotion(promotion : Promotions) + isValidDiscount(discount: Float) - + isVerifiedTime(startTime: Int, endTime: Int) + + isValidTime(startTime: Int, endTime: Int) + isValidDuration(...) - + isValidMonth( date: Int, month: Month, year: Int) + + isValidMonth(date: Int, month: Month, year: Int) + getAllPromotion() } @@ -61,7 +61,7 @@ enum Month #LightYellow { DEC(12) } -AddPromotionCommand --> Promotionlist : 1 +AddPromotionCommand --> Promotionlist : uses Promotionlist --> Promotion : 0..* diff --git a/docs/Diagrams/PUML files/Promotion/DeletePromotion.puml b/docs/Diagrams/PUML files/Promotion/DeletePromotion.puml index 73471ea82..ad0b27561 100644 --- a/docs/Diagrams/PUML files/Promotion/DeletePromotion.puml +++ b/docs/Diagrams/PUML files/Promotion/DeletePromotion.puml @@ -5,12 +5,12 @@ mainframe sd DeletePromotion participant ":PromotionCommand" as PromotionCommand -participant "<>\nPromotionlist" as Promotionlist +participant ":Promotionlist" as Promotionlist participant ":TextUi" as TextUi alt item has an ongoing promotion PromotionCommand -> Promotionlist : getPromotion(itemName) - Promotionlist -> PromotionCommand : promotion + Promotionlist --> PromotionCommand : promotion PromotionCommand -> Promotionlist : getIndex(promotion) Promotionlist --> PromotionCommand : index PromotionCommand -> Promotionlist : deletePromotion(index) diff --git a/docs/Diagrams/PUML files/Promotion/Promotion_SequenceDigram.puml b/docs/Diagrams/PUML files/Promotion/Promotion_SequenceDigram.puml index b01291e23..cbe36a410 100644 --- a/docs/Diagrams/PUML files/Promotion/Promotion_SequenceDigram.puml +++ b/docs/Diagrams/PUML files/Promotion/Promotion_SequenceDigram.puml @@ -3,10 +3,10 @@ 'https://plantuml.com/sequence-diagram participant ":PromotionCommand" as PromotionCommand -participant "<>\nPromotionlist" as PromotionList +participant ":Promotionlist" as PromotionList participant ":TextUi" as TextUi -participant "<>\nItemlist" as Itemlist -participant "<>\n Promotion" as Promotion +participant ":Itemlist" as Itemlist +participant ":Promotion" as Promotion -> PromotionCommand: execute() @@ -15,7 +15,7 @@ alt if user wants to create a promotion ref over PromotionCommand, PromotionList, Itemlist, Promotion, TextUi : AddPromotion else if user wants to delete a promotion ref over PromotionCommand, PromotionList, TextUi : DeletePromotion -else #Pink if user wants to list all promotions +else if user wants to list all promotions PromotionCommand -> TextUi: printPromotion() else if user enters invalid command end diff --git a/docs/team/hengshuhong.md b/docs/team/hengshuhong.md index 5f8ad5df2..2132f2a65 100644 --- a/docs/team/hengshuhong.md +++ b/docs/team/hengshuhong.md @@ -9,7 +9,7 @@ manage and operate their business. ### Code Contribution -- New Feature: Added the capability to add/delete/list promotions +- **New Feature: Added the capability to add/delete/list promotions** - What it does: allows the user to add a Promotion for a certain ITEM by entering the discount, startDate, endDate, startTime and endTime. When a Promotion is added for an ITEM, and the store owner uses the sell feature in the application, the discount will be immediately applied to the sell price and the discounted price will @@ -21,7 +21,7 @@ manage and operate their business. Another difficulty is to check if the item is within the promotion period for the given date and time. -- New Feature: Enhanced the find command to allow the user to search based on the specified item information. +- **New Feature: Enhanced the find command to allow the user to search based on the specified item information.** - What it does: allows the user to look through a filtered list to find the ITEM information based on the KEYWORD For instance, the user can find all ITEMS that has a buy price or sell price of $`1` - Justification: This feature increases the capabilities of the search function, as it can allow the user to quickly @@ -30,29 +30,26 @@ manage and operate their business. enhancement is an extension of the previous find command, meaning that it must still be able to retain its original feature, but yet still able to provide more than 1 filter to narrow the scope. -- New Feature: Enhanced the add command to prevent duplicate entries +**- New Feature: Enhanced the add command to prevent duplicate entries** - What it does: it prevents the user from accidentally inputting duplicated items. Instead, when the user adds a duplicated item, the item information will be updated based on the latest input and the quantity will be increased. - Justification: This feature enables the user to not have duplicate entries of the same items to avoid the overflowing of the inventory list with duplicated item. -- Code Contributed: [RepoSense link](https://nus-cs2113-ay2324s2.github.io/tp-dashboard/?search=hengshuhong&breakdown=true) +- **Code Contributed:** [RepoSense link](https://nus-cs2113-ay2324s2.github.io/tp-dashboard/?search=hengshuhong&breakdown=true) - **Documentation** - User Guide: - - Added documentation for the features `add`, `find`, `promotion`, `del_promo` and `list_promotions` - - Added the Quick Start + - Add documentation for the features `add`, `find`, `promotion`, `del_promo` and `list_promotions` + - Add the Quick Start - Update the Command Summary - - Added documentation for the features `add`, `find`, `promotion`, `del_promo` and `list_promotions`. [#86](https://github.com/AY2324S2-CS2113-T15-4/tp/pull/86) - - Added the Quick Start. - - Update the Command Summary. + - Developer Guide: - - Added implementation details of the `promotion` feature. [#176](https://github.com/AY2324S2-CS2113-T15-4/tp/pull/176) + - Add implementation details of the `promotion` feature. [#176](https://github.com/AY2324S2-CS2113-T15-4/tp/pull/176) - Update Product Scope [#181](https://github.com/AY2324S2-CS2113-T15-4/tp/pull/181/files) - - Added non-functional requirements. [#181](https://github.com/AY2324S2-CS2113-T15-4/tp/pull/181/files) - + - Add non-functional requirements. [#181](https://github.com/AY2324S2-CS2113-T15-4/tp/pull/181/files) - **Review Contributions** - - Fixed bug for team members that caused the application to crash. [#184](https://github.com/AY2324S2-CS2113-T15-4/tp/pull/184) - - Fixed test case that failed [#187](https://github.com/AY2324S2-CS2113-T15-4/tp/pull/187) - No newline at end of file \ No newline at end of file + - Fix bug for team members that caused the application to crash. [#184](https://github.com/AY2324S2-CS2113-T15-4/tp/pull/184) + - Fix test case that failed [#187](https://github.com/AY2324S2-CS2113-T15-4/tp/pull/187) + - Review team's UML Diagrams \ No newline at end of file