Skip to content

Commit

Permalink
Update DG and PPP
Browse files Browse the repository at this point in the history
  • Loading branch information
Shu committed Apr 15, 2024
1 parent a03a871 commit 2d72115
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 28 deletions.
Binary file modified docs/Diagrams/Images/Promotion/AddPromotion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Promotion/AddPromotion_ClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Promotion/DeletePromotion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Promotion/ListPromotion_SequenceDigram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Diagrams/Images/Promotion/Promotion_SequenceDigram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/Diagrams/PUML files/Promotion/AddPromotion.puml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ mainframe sd AddPromotion
autoactivate on

participant ":PromotionCommand" as PromotionCommand
participant "<<class>>\nPromotionlist" as Promotionlist
participant ":Promotionlist" as Promotionlist
participant ":TextUi" as TextUi
participant "<<class>>\nItemlist" as Itemlist
participant "<<class>>\n Promotion" as Promotion
participant ":Itemlist" as Itemlist
participant ":Promotion" as Promotion

PromotionCommand -> Promotionlist : addPromotion(promotion)
Promotionlist -> Itemlist : isItemExist(itemName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down Expand Up @@ -61,7 +61,7 @@ enum Month #LightYellow {
DEC(12)
}

AddPromotionCommand --> Promotionlist : 1
AddPromotionCommand --> Promotionlist : uses
Promotionlist --> Promotion : 0..*


Expand Down
4 changes: 2 additions & 2 deletions docs/Diagrams/PUML files/Promotion/DeletePromotion.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
mainframe sd DeletePromotion

participant ":PromotionCommand" as PromotionCommand
participant "<<class>>\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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
'https://plantuml.com/sequence-diagram

participant ":PromotionCommand" as PromotionCommand
participant "<<class>>\nPromotionlist" as PromotionList
participant ":Promotionlist" as PromotionList
participant ":TextUi" as TextUi
participant "<<class>>\nItemlist" as Itemlist
participant "<<class>>\n Promotion" as Promotion
participant ":Itemlist" as Itemlist
participant ":Promotion" as Promotion


-> PromotionCommand: execute()
Expand All @@ -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
Expand Down
27 changes: 12 additions & 15 deletions docs/team/hengshuhong.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
- 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

0 comments on commit 2d72115

Please sign in to comment.