Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CS2113-F14-2] DinEZ #82

Open
wants to merge 432 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 211 commits
Commits
Show all changes
432 commits
Select commit Hold shift + click to select a range
75230bd
Merge pull request #82 from adamzzq/branch-print-receipt
adamzzq Mar 31, 2024
6ad59e5
Implement Order.getReceipt method with discount
adamzzq Mar 31, 2024
b4e9002
Merge pull request #84 from adamzzq/branch-print-receipt
adamzzq Mar 31, 2024
6f5ba80
Implement Menu commands
Zhengwinter Mar 31, 2024
35938ea
Merge branch 'master' into master
Zhengwinter Mar 31, 2024
d7e1a94
Restructure the complete command to be used by both order and menu logic
Zhengwinter Mar 31, 2024
2062fec
Resolve merge conflicts
Zhengwinter Mar 31, 2024
e180aee
Reformat code to comply with char limit
Zhengwinter Mar 31, 2024
d2efbed
Merge pull request #85 from Zhengwinter/master
Zhengwinter Mar 31, 2024
7927ae7
Refactor code and abstract out classes, format in CamelCase
Zhengwinter Mar 31, 2024
afbbea0
Merge pull request #86 from Zhengwinter/master
Zhengwinter Mar 31, 2024
a61ab35
Update V2.0 working draft
Xb990219 Mar 31, 2024
f8fc688
Merge branch 'Xb990219-mainLogic'
Xb990219 Mar 31, 2024
578139d
resolve merge conflict
Xb990219 Mar 31, 2024
cc61ff8
Fix minor bugs
Xb990219 Mar 31, 2024
8d19008
Fix checkstyle
Xb990219 Mar 31, 2024
8fccca2
Merge pull request #88 from Xb990219/master
Xb990219 Mar 31, 2024
cd028a8
Update User Guide for v2.0
webtjs Apr 3, 2024
68f82b5
Merge pull request #91 from webtjs/master
webtjs Apr 3, 2024
0002c1a
Update UG with input formats specification
adamzzq Apr 3, 2024
b86b4e9
Merge pull request #92 from adamzzq/branch-UG
adamzzq Apr 3, 2024
963f596
Add FAQ in the user guide
Zhengwinter Apr 3, 2024
2b2483f
Merge pull request #93 from Zhengwinter/master
Zhengwinter Apr 3, 2024
b702920
Include confirmation message to OrderCompleteCommand
adamzzq Apr 3, 2024
89cc525
Merge pull request #94 from adamzzq/branch-complete-order-msg
adamzzq Apr 3, 2024
c9b895a
Add confirmation command for completing an order
Xb990219 Apr 3, 2024
330f2ff
Merge pull request #95 from Xb990219/master
Xb990219 Apr 3, 2024
4dac5d6
MainCommandTest.java: Refactor test code
webtjs Apr 4, 2024
38e2d20
Merge pull request #96 from webtjs/branch-v2.0
webtjs Apr 4, 2024
3226c2c
Fix the bug of view menu item name overflow
adamzzq Apr 7, 2024
8b4d56f
Merge pull request #128 from adamzzq/branch-bugfix-menu-display
adamzzq Apr 7, 2024
15d40b3
OrderHelpCommand.java: Fix incorrect command description in help message
webtjs Apr 7, 2024
b8e7868
Merge pull request #129 from webtjs/branch-bugfix-incorrect-order-hel…
webtjs Apr 7, 2024
f10e9b0
Change menu item ID to numbers in natural order
adamzzq Apr 8, 2024
b96a304
Fix MenuDeleteCommand's JavaDoc style
adamzzq Apr 8, 2024
21210b2
Merge pull request #130 from adamzzq/branch-simplify-menu-item-id
adamzzq Apr 8, 2024
01d1f4f
Change large values of menu items prices to scientific notation
adamzzq Apr 8, 2024
6db9cfb
Change menu/order exit from 'bye' to 'cancel', update UG and DG
Xb990219 Apr 8, 2024
9b52123
Update complete message
Xb990219 Apr 8, 2024
7917713
Fix checkstyle
Xb990219 Apr 8, 2024
6de3c57
Merge pull request #131 from Xb990219/master
Xb990219 Apr 8, 2024
26b5a41
Add more descriptive messages for invalid commands
webtjs Apr 8, 2024
562abe8
Add messages for invalid commands in the different interfaces
webtjs Apr 8, 2024
dcd515b
Merge pull request #132 from webtjs/branch-bugfix-unclear-error-messages
webtjs Apr 8, 2024
089f700
Add indication of which interface user is currently in
webtjs Apr 8, 2024
b268e89
Merge pull request #133 from webtjs/branch-bugfix-current-interface-u…
webtjs Apr 8, 2024
22de9f9
Fix documentation in User Guide to clarify organization structure
Zhengwinter Apr 9, 2024
c55a9d8
Merge pull request #134 from Zhengwinter/master
Zhengwinter Apr 9, 2024
f42c860
Add invalid command messages for default case in switch case
webtjs Apr 9, 2024
a0c2f92
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp …
adamzzq Apr 9, 2024
295ede1
Merge pull request #135 from webtjs/branch-bugfix-unclear-error-messages
webtjs Apr 9, 2024
a7eb904
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp …
adamzzq Apr 9, 2024
7e26c7b
Make menu class SLAP more
adamzzq Apr 9, 2024
7771425
Merge pull request #136 from adamzzq/branch-bugfix-menu-display
adamzzq Apr 9, 2024
993bccd
Add feature to revert changes to menu after using "cancel" command
webtjs Apr 9, 2024
afe515e
Fix MainCommandTest.java JUnit test and MainLogic.java checkstyle
webtjs Apr 9, 2024
f736c0b
Merge pull request #137 from webtjs/branch-bugfix-revert-changes-with…
webtjs Apr 9, 2024
e8f912b
Fix decimal point format bug
adamzzq Apr 9, 2024
8619b70
Merge pull request #138 from adamzzq/branch-fix-decimal-point-format
adamzzq Apr 9, 2024
2f20fb6
Fix bug when quantity of item added to order is too large
webtjs Apr 9, 2024
8fadfb0
Merge pull request #139 from webtjs/branch-bugfix-order-add-quantity-…
adamzzq Apr 9, 2024
5ed6919
Show receipt instead of single items in the view order command
adamzzq Apr 9, 2024
5552580
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp …
adamzzq Apr 9, 2024
3b5c2b9
Merge pull request #140 from adamzzq/branch-fix-view-receipt
adamzzq Apr 9, 2024
c0358f0
Implement restaurant name, location, order taker information in order
Zhengwinter Apr 9, 2024
c689934
Merge branch 'master' into master
Zhengwinter Apr 9, 2024
5719c83
Enclose order type input in try/catch block and improve robustness of…
Zhengwinter Apr 9, 2024
7481671
Resolve minor merge conflicts
Zhengwinter Apr 9, 2024
1cd0dcd
Resolve minor bug in test case
Zhengwinter Apr 9, 2024
b6e2a03
Merge pull request #141 from Zhengwinter/master
Zhengwinter Apr 9, 2024
f52eb20
Handle invalid inputs for restaurant details and order type
webtjs Apr 9, 2024
9c44592
Change receipt format
adamzzq Apr 9, 2024
e541fe4
Change receipt format
adamzzq Apr 9, 2024
d321248
Merge remote-tracking branch 'origin/branch-print-receipt' into branc…
adamzzq Apr 9, 2024
c3458eb
Fix checkstyle issue
adamzzq Apr 9, 2024
206b967
Update receipt format
adamzzq Apr 9, 2024
650eeb0
Add JavaDoc to new methods in Order.java
adamzzq Apr 9, 2024
e379d77
Update JavaDoc in Order.java
adamzzq Apr 9, 2024
bb6c873
Update JavaDoc in Order.java
adamzzq Apr 9, 2024
24d2895
Improve code quality
adamzzq Apr 9, 2024
d1322ca
Add range checking for discount
adamzzq Apr 9, 2024
9e7e047
Add range checking for discount
adamzzq Apr 9, 2024
e16017d
Add Zhengwinter's PPP
Zhengwinter Apr 10, 2024
2fe5701
Merge pull request #145 from Zhengwinter/master
Zhengwinter Apr 10, 2024
c3b2b95
Update line alignment according to review
adamzzq Apr 10, 2024
4a74962
Fix charge alignment bug
adamzzq Apr 10, 2024
799c046
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp
adamzzq Apr 11, 2024
e76dbf1
Merge pull request #144 from adamzzq/branch-print-receipt
adamzzq Apr 11, 2024
03453cb
Merge pull request #143 from webtjs/branch-HandleInvalidDetails
webtjs Apr 11, 2024
b083d47
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp …
adamzzq Apr 11, 2024
d9656b7
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp
adamzzq Apr 11, 2024
49fe560
Add storage feature for restaurant details, menus, and orders
webtjs Apr 11, 2024
22994be
Merge branch 'master' into branch-Storage
webtjs Apr 11, 2024
52f7b78
MainLogic.java: Fix checkstyle error
webtjs Apr 11, 2024
5ea215a
Merge pull request #146 from webtjs/branch-Storage
webtjs Apr 11, 2024
a44deb3
Add webtjs PPP
webtjs Apr 12, 2024
6e9bdbd
Merge pull request #148 from webtjs/branch-webtjs-PPP
webtjs Apr 12, 2024
4bd5934
Storage.java: Handle NoSuchElement exception when reading save file
webtjs Apr 12, 2024
d0d6ca6
Merge pull request #149 from webtjs/branch-Storage
webtjs Apr 12, 2024
01a6bad
MainLogic.java: Refactor code
webtjs Apr 12, 2024
5c75c16
Restaurant.java: Update authorship
webtjs Apr 12, 2024
0ecbb0f
Merge pull request #150 from webtjs/master
webtjs Apr 12, 2024
ee7b9ad
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp
adamzzq Apr 12, 2024
5f6ec56
Start PPP draft
adamzzq Apr 12, 2024
9ae002a
Merge pull request #151 from adamzzq/branch-ppp
adamzzq Apr 12, 2024
1076188
Add PPP
Xb990219 Apr 12, 2024
13ecc7e
Merge pull request #152 from Xb990219/master
Xb990219 Apr 12, 2024
e8d4743
update PPP
Xb990219 Apr 12, 2024
c711e1b
Merge pull request #153 from Xb990219/master
Xb990219 Apr 12, 2024
56c81b6
Add feature to view and edit restaurant info
webtjs Apr 12, 2024
aa1b9da
Merge pull request #154 from webtjs/branch-MainRestaurantInfo
webtjs Apr 12, 2024
4556fab
Added documentation for various commands
Zhengwinter Apr 12, 2024
b1d8ddb
Merge pull request #155 from Zhengwinter/master
Zhengwinter Apr 12, 2024
a2418d0
Refactor code to remove unused token in initializeSystem in MainLogic
Zhengwinter Apr 12, 2024
8d4f20b
Merge pull request #156 from Zhengwinter/master
Zhengwinter Apr 12, 2024
5c03bf7
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp …
adamzzq Apr 13, 2024
3cab29c
Add test case for menu commands and updated Zhengwinter's PPP
Zhengwinter Apr 13, 2024
94d69f2
Comment out test that failed as it is being worked on
Zhengwinter Apr 13, 2024
15ddafd
Remove menu command wildcard import
Zhengwinter Apr 13, 2024
b56d014
Remove unused import statements in menuTest
Zhengwinter Apr 13, 2024
9df185a
Merge pull request #160 from Zhengwinter/master
Zhengwinter Apr 13, 2024
6018e06
Fix DG bugs based on review by TA
webtjs Apr 13, 2024
5ebd513
Update images for edited diagrams
webtjs Apr 13, 2024
33dbac9
Abstract case if menu is not found into MainEditMenuCommand.java
webtjs Apr 13, 2024
a75873d
Improve menu display
adamzzq Apr 13, 2024
4a44662
MainCommandTest.java: Update JUnit test for MainEditMenuCommand
webtjs Apr 13, 2024
f3bb9d8
Merge pull request #162 from webtjs/branch-MainCreateEditMenuCommand
webtjs Apr 13, 2024
27dd667
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp …
adamzzq Apr 13, 2024
70c1df8
Change menu related test cases according to new format
adamzzq Apr 13, 2024
c6d6b95
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp …
adamzzq Apr 13, 2024
f885462
Merge pull request #163 from adamzzq/branch-fix-menuItem-id
adamzzq Apr 13, 2024
e5da330
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp …
adamzzq Apr 13, 2024
bc3c759
Updatate MenuLogic in DG
Xb990219 Apr 13, 2024
a991c9b
Add documentation for all methods used
Xb990219 Apr 13, 2024
920a51d
resolve conflict
Xb990219 Apr 13, 2024
6b1dba2
Update model component class diagram based on PR review
webtjs Apr 13, 2024
560939b
resolve conflict-2
Xb990219 Apr 13, 2024
42e88ff
update DG with product scope
Xb990219 Apr 13, 2024
02b2017
Merge pull request #164 from Xb990219/master
Xb990219 Apr 13, 2024
efd5aa7
Storage.java: Add documentation
webtjs Apr 13, 2024
c1c9c23
Merge pull request #165 from webtjs/branch-Storage
webtjs Apr 13, 2024
69734c7
Merge branch 'master' into branch-DG
webtjs Apr 13, 2024
a5bdc7b
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp …
adamzzq Apr 13, 2024
557c9a4
Add OrderStatistics class to track restaurant performance
adamzzq Apr 13, 2024
968035f
Merge pull request #166 from adamzzq/branch-stats
adamzzq Apr 13, 2024
dc2f2bf
Add OrderStatistics related classes and variables
adamzzq Apr 13, 2024
0097dc4
Update UG for the newly added OrderStatistics feature
adamzzq Apr 13, 2024
b36e00c
Update DG for v2.1
webtjs Apr 13, 2024
afac1cd
Merge pull request #168 from adamzzq/branch-StatsLogic
adamzzq Apr 14, 2024
769cb26
Update community interaction in PPP
Zhengwinter Apr 14, 2024
735b3e7
Merge branch 'master' of github.com:AY2324S2-CS2113-F14-2/tp
Zhengwinter Apr 14, 2024
d4b16e2
Merge pull request #161 from webtjs/branch-DG
webtjs Apr 14, 2024
ad55995
Add FAQ for net revenue vs profit
Zhengwinter Apr 14, 2024
53f4a36
Merge branch 'master' of github.com:AY2324S2-CS2113-F14-2/tp
Zhengwinter Apr 14, 2024
3af6253
Update UserGuide with new features (save data, restaurant info)
webtjs Apr 14, 2024
ccf94f3
Merge pull request #170 from webtjs/branch-UG
webtjs Apr 14, 2024
448ca2f
Merge branch 'master' into branch-webtjs-PPP
webtjs Apr 14, 2024
009f88d
Add constraints and error messages of user input values
adamzzq Apr 14, 2024
980ad0c
Merge pull request #171 from adamzzq/branch-quantity-limit
adamzzq Apr 14, 2024
042bedf
Add discount to menu's complete command
adamzzq Apr 14, 2024
cb8d6ed
Merge pull request #172 from adamzzq/branch-quantity-limit
adamzzq Apr 14, 2024
621d53c
Merge branch 'master' of github.com:AY2324S2-CS2113-F14-2/tp
Zhengwinter Apr 14, 2024
2cfa5d3
Merge pull request #173 from Zhengwinter/master
Zhengwinter Apr 14, 2024
c1ee272
update UG and DG
Xb990219 Apr 14, 2024
615e867
Update PPP
webtjs Apr 14, 2024
4183566
Merge pull request #174 from Xb990219/master
Xb990219 Apr 14, 2024
295f82c
Update UG and rectify indexing issue
Zhengwinter Apr 14, 2024
c164186
Resolve merge conflicts
Zhengwinter Apr 14, 2024
5da9b43
Merge pull request #175 from Zhengwinter/master
Zhengwinter Apr 14, 2024
4cc7aae
Storage.java: Fix bug relating to save file
webtjs Apr 14, 2024
da7273e
Change the display layout for view item command in the order interface
adamzzq Apr 14, 2024
d4a8825
Merge pull request #176 from webtjs/master
webtjs Apr 14, 2024
08a9d03
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp
adamzzq Apr 14, 2024
474433b
Merge pull request #177 from adamzzq/branch-view-items
adamzzq Apr 14, 2024
2ab65c7
Add some test cases for OrderStatistics
adamzzq Apr 14, 2024
242c835
Fix bugs:
adamzzq Apr 14, 2024
dd21e86
Update example menu IDs in DeveloperGuide
webtjs Apr 14, 2024
0de1dc9
Merge pull request #178 from webtjs/master
webtjs Apr 14, 2024
df08cf4
Fix bugs:
adamzzq Apr 14, 2024
161ba79
Merge pull request #179 from adamzzq/branch-fix-receipt-bugs
adamzzq Apr 14, 2024
6017651
MainCommandTest.java: Add more JUnit tests
webtjs Apr 14, 2024
4c07e03
Fix bug: View menu command should show "menu <menu_id> with XX items"
adamzzq Apr 14, 2024
d6b3db4
Merge pull request #180 from webtjs/master
webtjs Apr 14, 2024
b20db24
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp …
adamzzq Apr 14, 2024
88196b8
Merge pull request #181 from adamzzq/branch-fix-view-menu-display
adamzzq Apr 14, 2024
fb93f95
fix images problem in DG
Xb990219 Apr 14, 2024
82c8645
fix images problem in DG
Xb990219 Apr 14, 2024
65ac285
Merge pull request #182 from Xb990219/master
Xb990219 Apr 14, 2024
2488114
finalised UG
Xb990219 Apr 14, 2024
0d7b1c4
Merge pull request #183 from Xb990219/master
Xb990219 Apr 14, 2024
1ed40af
Update order command test cases
Zhengwinter Apr 14, 2024
5f10be8
Add test cases for all order commands
Zhengwinter Apr 14, 2024
9858c6b
Fix format issue in test case
Zhengwinter Apr 14, 2024
12638b6
Fix minor grammar issue
Zhengwinter Apr 14, 2024
9f82218
Merge pull request #184 from Zhengwinter/master
Zhengwinter Apr 14, 2024
5d23080
Add Storage component in DeveloperGuide
webtjs Apr 14, 2024
e773ac4
Update Storage component in DG
webtjs Apr 14, 2024
aad2c79
Merge pull request #185 from webtjs/master
webtjs Apr 14, 2024
19ff911
Add StatsLogic in DG
adamzzq Apr 14, 2024
d0803f7
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp …
adamzzq Apr 14, 2024
70ba7ae
Update README.md to add PPP link
adamzzq Apr 14, 2024
f07e44f
Restore OrderDeleteCommand.java edit by removing a space
adamzzq Apr 14, 2024
a3fed85
Merge pull request #186 from adamzzq/branch-statsLogic-DG
adamzzq Apr 14, 2024
d3b07a7
Update Zhengwinter's PPP
Zhengwinter Apr 15, 2024
9ce1d4e
Merge pull request #187 from Zhengwinter/master
Zhengwinter Apr 15, 2024
0ecc1c9
Finalised DG
Xb990219 Apr 15, 2024
45704bd
Merge pull request #188 from Xb990219/master
Xb990219 Apr 15, 2024
eab087e
Update Storage related components
webtjs Apr 15, 2024
a1312b9
Merge branch 'master' into branch-RefactorFor2.1
webtjs Apr 15, 2024
2e98926
Merge pull request #189 from webtjs/branch-RefactorFor2.1
webtjs Apr 15, 2024
c8cce50
Decrease image size in DG
webtjs Apr 15, 2024
b6d945d
Merge pull request #190 from webtjs/master
webtjs Apr 15, 2024
8622828
Add pagebreak in DG
webtjs Apr 15, 2024
93a4af6
Merge pull request #191 from webtjs/master
webtjs Apr 15, 2024
8df875c
Change pagebreak in DG
webtjs Apr 15, 2024
e109a3a
Update grammatical error in UG
webtjs Apr 15, 2024
7049190
Merge pull request #192 from webtjs/master
webtjs Apr 15, 2024
95ed22a
Add additional pagebreak in DG
webtjs Apr 15, 2024
7f84dc5
Merge pull request #193 from webtjs/master
webtjs Apr 15, 2024
b745d12
Update DG
webtjs Apr 15, 2024
e517e0b
Change image source file in DG
webtjs Apr 15, 2024
75eace8
Merge pull request #194 from webtjs/master
webtjs Apr 15, 2024
526f4e5
Fix formatting issue in DG
webtjs Apr 15, 2024
775c6d7
Merge pull request #195 from webtjs/master
webtjs Apr 15, 2024
f239d0c
Merge branch 'master' into branch-webtjs-PPP
webtjs Apr 15, 2024
6a150cb
Update Zheqi's PPP
adamzzq Apr 15, 2024
38c7123
Merge pull request #196 from adamzzq/branch-ppp
adamzzq Apr 15, 2024
88e1410
Add new User Stories in DG, and correct some grammatical errors
adamzzq Apr 15, 2024
85196f7
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F14-2/tp …
adamzzq Apr 15, 2024
a3de7ed
Merge pull request #197 from adamzzq/branch-more-user-stories
adamzzq Apr 15, 2024
2aa9de7
Update Zheqi's PPP
adamzzq Apr 15, 2024
56fcc62
Update Zheqi's PPP
adamzzq Apr 15, 2024
4191744
Merge pull request #198 from adamzzq/branch-ppp
adamzzq Apr 15, 2024
e4e69e3
Update webtjs PPP
webtjs Apr 15, 2024
943aa10
Merge branch 'master' into branch-webtjs-PPP
webtjs Apr 15, 2024
e901e41
Update LoC in webtjs PPP
webtjs Apr 15, 2024
047c643
Edit UG and fix grammatical errors and formatting issues
Zhengwinter Apr 15, 2024
d359765
Merge pull request #200 from Zhengwinter/master
Zhengwinter Apr 15, 2024
8ffa4aa
Merge pull request #199 from webtjs/branch-webtjs-PPP
webtjs Apr 15, 2024
661bd43
Comment out loggers and update DG
Zhengwinter Apr 15, 2024
930bfb2
Update link in webtjs PPP
webtjs Apr 15, 2024
573a685
Remove unused imports
Zhengwinter Apr 15, 2024
b7ee53d
Merge pull request #202 from webtjs/branch-webtjs-PPP
webtjs Apr 15, 2024
ba1b82a
Merge pull request #201 from Zhengwinter/master
Zhengwinter Apr 15, 2024
1e5d4d2
Update Wentao and Xiao Bo PPP
Zhengwinter Apr 15, 2024
9fe969c
Merge pull request #203 from Zhengwinter/master
Zhengwinter Apr 15, 2024
74d5a8a
Update Zheqi's PPP
adamzzq Apr 15, 2024
a1f2812
Merge pull request #204 from adamzzq/branch-ppp
adamzzq Apr 15, 2024
febade4
Minor update to PPP
Zhengwinter Apr 15, 2024
9b549e9
Merge pull request #205 from Zhengwinter/master
Zhengwinter Apr 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT

#log files
*.log
3 changes: 3 additions & 0 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: logic.MainLogic

4 changes: 4 additions & 0 deletions MenuLogger.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="GBK" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
</log>
28 changes: 28 additions & 0 deletions OrderAddCommandLogger.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="GBK" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
<date>2024-04-03T14:19:34.748138100Z</date>
<millis>1712153974748</millis>
<nanos>138100</nanos>
<sequence>0</sequence>
<logger>OrderAddCommandLogger</logger>
<level>INFO</level>
<class>command.order.OrderAddCommand</class>
<method>execute</method>
<thread>1</thread>
<message>Adding new item to order</message>
</record>
<record>
<date>2024-04-03T14:19:34.751139200Z</date>
<millis>1712153974751</millis>
<nanos>139200</nanos>
<sequence>1</sequence>
<logger>OrderAddCommandLogger</logger>
<level>INFO</level>
<class>command.order.OrderAddCommand</class>
<method>execute</method>
<thread>1</thread>
<message>Item successfully added to order</message>
</record>
</log>
Empty file added OrderAddCommandLogger.log.lck
Empty file.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ checkstyle {

run{
standardInput = System.in
enableAssertions = true
}
13 changes: 6 additions & 7 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# About us

Display | Name | Github Profile | Portfolio
--------|:----:|:--------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
Display | Name | Github Profile | Portfolio
--------|:------------:|:--------------:|:---------:
![](https://media.licdn.com/dms/image/D4D03AQHqwchTapLQSw/profile-displayphoto-shrink_800_800/0/1689641178627?e=1715817600&v=beta&t=0zJsfORUyukckyySHLfJWKJGEdSk6vE4IBQLC0tEiPo) | Zheng Wentao | [Github](https://github.com/Zhengwinter/) | [Portfolio](docs/team/johndoe.md)
![](https://media.licdn.com/dms/image/D5635AQF9CsBIurtIhQ/profile-framedphoto-shrink_400_400/0/1709822298987?e=1710486000&v=beta&t=ZFPmBTwS2j4itxdUfOToKvL_Wd55X4m0V1_SBnHl_Go) | Xiao Bo | [Github](https://github.com/Xb990219) | [Portfolio](docs/team/UserGuide.md)
![](https://static.wikia.nocookie.net/pure-good-wiki/images/6/6e/Winnie_The_Pooh.png/revision/latest?cb=20210310185331) | Zeng Zheqi | [Github](https://github.com/adamzzq) | [Portfolio](youtube.com)
![](https://media.licdn.com/dms/image/D5603AQFfWFYq1mqgcA/profile-displayphoto-shrink_400_400/0/1696897863941?e=1715212800&v=beta&t=TLopY2QuxEZz9oFQttl_5avFfWdGFdeMX25c60Tnvl8) | Webster Tan | [Github](https://github.com/webtjs) | [Portfolio](docs/team/UserGuide.md)
131 changes: 129 additions & 2 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,137 @@

{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good that the acknowledgment section is here. But will it be better to update the section?


## Design & implementation
## Design

{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
### Architecture
![Architecture](images\Architecture.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An excellent high-level class diagram! Simple, clear and straight to the point. Good for understanding.


The **Architecture diagram** given above shows the high-level design of the application.

Given below is a quick overview of main components and how they interact with each other.

**`Main`** is in charge of the app launch, shut down, and taking user input.

* At the app launch, it loads the data from the file system, and initializes other components.
* At the app shut down, it saves the data to the file system, and shuts down other components.

The app's work is done by the following components:

* [**`MainLogic`**](#sublogic-component): The main logic command executor.
* [**`SubLogic`**](#sublogic-component): The sub logics(i.e. **`MenuLogic`**, **`OrderLogic`**) command executor.
* [**`Parser`**](#parser-component): The parser that parses user input to command.
* [**`Model`**](#model-component): The data model that stores the data.
* [**`Command`**](#command-component): Represents a command that the user can execute.
* [**`Storage`**](#storage-component): Reads data from, and writes data.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like the links provided here


**How the architecture components interact with each other**

The *Sequence Diagram* below shows how the components interact with each other for the scenario where the user issues
the command `Create order -menu 01`, `add -item 001` and `complete`.

![Sequence Diagram](images\ArchitectureSequanceDiagram.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clear sequence diagram.

image

Will it be better is there is a better contrast of the text and the colour of the background for better readability?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Will it be better for the text to not be above the diagram lines?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be clearer if we can highlight the commands Create order -menu 01, add -item 001 and complete in the sequence diagram.
but overall, i like the colors for readability and it looks neat


### UI Component
The UI component is responsible for parsing user input into commands that can be executed by the logic component.
There is a `analyzeInput` method in the `Parser` class that interprets the user input and classifies
it into a `CommandType` enum.<br>
The `splitInput` method is used to split the user input into an array of strings, according to the command type.
It returns an array containing any arguments that are needed to execute the command.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: would the explanation be more readable if we follow the format of Logic Component where each method/class has its respective explanation in its respective paragraph?


### Logic Component
The logic component consists of classes that handle the logic of the application. The logic component is divided into
`MainLogic` and `SubLogic` which consists of `OrderLogic` and `MenuLogic`.

* [**`MainLogic`**](#model-component): A class to handle the first level commands, and pass the user input to corresponding
classes for analysis and execution.
* [**`OrderLogic`**](#model-component) and [**`MenuLogic`**](#model-component): A class to handle the second level commands,
and pass the user input to corresponding classes for analysis and execution.

### Command Component
The command component consists of two different command interfaces: `MainCommand` and `OrderCommand`. The `MainCommand`
interface is for the various command classes that are used in the `MainLogic`, while the `OrderCommand` interface is for
command classes used in `OrderLogic`.

A `Command` object will be created in either the `MainLogic` or `OrderLogic`
based on what command the user has inputted(e.g., `MainHelpCommand` object is created when the user inputs the `help`
command). The `execute()` method of the `Command` object is then called to execute the command, which may require
certain arguments based on the type of command.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See nit above (similar to UI component).
Alternatively, a diagram may be useful to make it more readable/ consistent


### Model Component
The model consists of classes describing the objects used in this application.
The general structure is that menu and order are separate, but they both work with `menuItem(s)`, which
represent food items on the menu.

* [**`ItemManager`**](#model-component): An interface containing methods representing operations common to **`Menu`**
and **`Order`**. <br><br />
* [**`Item`**](#model-component): An abstract class representing a food item. It should be implemented by **`MenuItem`**.
<br><br />
* [**`Menu`**](#model-component): A class representing the menu(s) of the restaurant, where each contains menuItem(s)
that can be ordered. Multiple menus can exist and each has a unique ID. <br><br />
* [**`MenuItem`**](#model-component): A class inheriting item, and represents a food item on the menu. <br><br />
* [**`Order`**](#model-component): A class representing an order to be entered into the system to be kept track of. Each
order has a unique ID generated from the time of order.<br><br />
* [**`SetMenu`**](#model-component): An enumeration representing the different types of set menus available, examples of
which includes *breakfast*, *lunch*, *dinner*.

The *Class Diagram* below shows how the model components interact with each other, including interactions such as
dependencies, associations and inheritance.

![Class Diagram](images/modelcomponent.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Good class diagram! But will it be better to leave the getters and setters out of the diagram since they are not necessary?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
we can also consider removing other unimportant functions here too

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Will it be better to remove the icon as it is not taught in class? It can be disabled 😄


## Implementation

### `MainLogic`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the consistent format in explaining the individual methods of MainLogic :)

Generally, the main logic works as follows:
1. User enters an input which is received in the *ui* and parsed by the `Parser`.
2. The `Parser` classifies the command based on `CommandType`.
3. If it is a first level command, `execute` is called on the corresponding class.
4. If it is not a first level command, the command will be pass to `SubLogic` to handle.

**Create Order** <br>
`Mainlogic` takes user input and crate an `Order` class and pass it to `OrderLogic` to execute the command.

**View Order by ID** <br>
`Mainlogic` takes in the command and the order ID, execute the `view order` command by calling a static method<br>
in `ViewOrderCommand` class.

**View all orders** <br>
`Mainlogic` takes in the command and calls the `ViewOrdersSummaryCommand` class to execute the command<br>
by querying the orderList.

**View Receipt** <br>
`Mainlogic` takes in the command and calls the `ViewReceiptCommand` class to execute the command
### `OrderLogic`
Generally, the order logic works as follows:
1. User enters an input which is received in the *ui* and parsed by the `Parser`.
2. The `Parser` classifies the command based on `CommandType`
3. Within `OrderLogic`, `execute` is called on the corresponding class
4. Control is passed to other sections of the code

**View Menu** <br>
Within the construct of the order logic, the menu can be accessed for viewing in order to select items from
available menus. This is carried out with the `view menu` command.

**View Item**
Within `OrderLogic`, a list containing all the items that have been added to the current active order can be viewed by executing
the `view item` command.

**Add**
Inside `OrderLogic`, items from the menu can be added into the current active order.
This is carried out using the `add -item <item_id> -quantity <quantity_of_item>` command,
where `<item_id>` is an integer corresponding to the item's id in the menu,
and `<quantity_of_item>` is an integer of the amount of that item to be added.

**Delete**
In `OrderLogic`, items from the current order can be removed via the
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a nit: to make it consistent, we may want to standardize using "Inside" or "in"

`delete -item <item_id> -quantity <quantity_of_item>` command. `<item_id>`
and `<quantity_of_item>` are the same type of parameters as the ones specified
in the `Add` command class.

**Complete**
Inside `OrderLogic`, once the order is finished, it can be completed and closed
by executing the `complete` command. This marks the current order as completed
and the program returns back to `MainLogic` for subsequent command executions.

## Product scope
### Target user profile
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Duke
# DINEZ

{Give product intro here}

Expand Down
32 changes: 32 additions & 0 deletions docs/UMLdiagrams/Architecture.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@startuml
!include <office/Concepts/globe_internet>
!include <office/Concepts/documents>
!include <office/Users/user>
!include style.puml

Class "<$user>" as User #red
Class "<$documents>" as File #blue

Package " "<<Rectangle>>{
Class Main #grey
Class MainLogic MAIN_LOGIC_COLOR
Class Command COMMAND_COLOR
Class SubLogic SUB_LOGIC_COLOR
Class Storage STORAGE_COLOR
Class Model MODEL_COLOR
Class Parser PARSER_COLOR
}
User .left.> Main : input
Main .right.> User : output
Main .left.> MainLogic
MainLogic -down.> SubLogic #green
MainLogic -left.> Parser #green
Main -up-> Storage #green
MainLogic -up> Model #green
SubLogic -left.> Parser #red
SubLogic -down-> Model #red
Command -down-> Model #lightgreen
Storage -right.> File #black
Parser -down.> Command #orange

@enduml
67 changes: 67 additions & 0 deletions docs/UMLdiagrams/ArchitectureSequanceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
@startuml
!include style.puml

Actor User as user USER_COLOR
Participant ":MainLogic" as mainLogic MAIN_LOGIC_COLOR
Participant ":SubLogic(OrderLogic)" as subLogic SUB_LOGIC_COLOR
Participant ":Parser" as parser PARSER_COLOR
Participant ":Command" as command COMMAND_COLOR
Participant ":Model" as model MODEL_COLOR
participant ":Storage" as storage STORAGE_COLOR


user -> mainLogic : "Create order -menu 01"
activate mainLogic MAIN_LOGIC_COLOR
mainLogic -> parser : analyzeInput("Create order -menu 01")
activate parser PARSER_COLOR
parser --> mainLogic : return command
deactivate parser
mainLogic -> command : execute(command)
activate command COMMAND_COLOR
command -> model : get(menu01)
activate model MODEL_COLOR
model --> command : return menu01
deactivate model
command -> model : createOrder(menu01)
activate model MODEL_COLOR
model --> command : return newOrder
deactivate model
command --> subLogic : return newOrder
deactivate command
activate subLogic SUB_LOGIC_COLOR
user -> subLogic : "add -item 001"
subLogic -> parser : analyzeInput("add -item 001")
activate parser PARSER_COLOR
parser --> subLogic : return command
deactivate parser
subLogic -> command : execute(command)
activate command COMMAND_COLOR
command -> model : get(item001)
activate model MODEL_COLOR
model --> command : return item001
deactivate model
command -> model : addItem(newOrder, item001)
activate model MODEL_COLOR
model --> command : return newOrder
deactivate model
command --> subLogic : return newOrder
deactivate command
user -> subLogic : "complete"
subLogic -> parser : analyzeInput("complete")
activate parser PARSER_COLOR
parser --> subLogic : return command
deactivate parser
subLogic -> command : execute(command)
activate command COMMAND_COLOR
deactivate subLogic
command --> mainLogic : return newOrder
deactivate command
mainLogic -> storage : save(newOrder)
activate storage STORAGE_COLOR
storage --> mainLogic
deactivate storage




@enduml
71 changes: 71 additions & 0 deletions docs/UMLdiagrams/model.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
@startuml
'https://plantuml.com/class-diagram

skinparam dpi 600

abstract class Item {
-id
- name
- unitPrice

+ Item (id: String, name: String, unitPrice: double)
+getID() : String
+getName() : String
+getPrice() : double

}
interface ItemManager {
add(var1: MenuItem) : boolean
remove(var1: String) : boolean
getID() : String
}
class Menu {
- logr
- menuID
- setupLogger() : void
+ Menu(menuID: String)
+ getItem(itemID: String) : Optional<MenuItem>
+ getID() : String
+ add(item: MenuItem) : boolean
+ remove(itemID: String) : boolean
+ toString() : String
}
class MenuItem {
+ MenuItem(id: String, name: String, unitPrice: double)
+ toString(): String
+ compareTo(o: MenuItem) : int
}
class Order {
- SERVICE_CHARGE
- GST
- orderID
+ add(item: MenuItem) : boolean
+ remove(itemID: String) : boolean
+ remove(item: MenuItem) : boolean
+ getItemCount(itemID String): int
+ getID() : String
+ getSize() : int
+ getTotalPrice() : double
+ getReceipt() : String
+ getOrderSummary() : String
+ toString() : String
}
enum SetMenu {
Breakfast
Lunch
Dinner
}

Item <|-- MenuItem

ItemManager <|.. Menu
ItemManager <|.. Order

MenuItem "1" <.. Order : order
MenuItem "1" <.. Menu : menu

SetMenu <.. Menu



@enduml
Loading
Loading