-
Notifications
You must be signed in to change notification settings - Fork 140
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-W13-3] EventManagerCLI #7
base: master
Are you sure you want to change the base?
Changes from 250 commits
c0d4d92
3e9c624
ec57e67
96e337b
76702ce
a3dfa13
facc333
bb1b843
904592e
78e6402
7c29014
d66b9d7
24ceec5
915c42c
ccf7db6
aa0ab83
10659b9
62b92ea
8e53e66
50a61e7
844b002
584d062
0ad5fab
29639b3
7fba40b
23dd6d5
f8a8d22
e8700ad
e62cbd5
5d34384
9522608
62f5115
cc24e30
75b5ba4
744c611
7aa520f
e76cea5
1fb9a7c
3181caa
0ee476b
8e8ee21
5a7707d
4d717da
b4bd909
3a1f4be
8621f12
a4cb509
0b93d14
c5486d0
9c23935
6fcffc0
cf814fd
a894a75
6119e1a
0657ab9
e82ce11
0cdb059
c600037
406eef9
a4bb047
c2b98cd
2fc6dea
2662a56
ba860c1
3d624e4
275bb4e
6529cda
95a6a72
cb54211
724e22d
5117e05
e7d1f3d
6948dd6
b9a25da
0411672
23b1246
739bd8b
a1fd668
ba4860e
562ffd1
3bae176
5913133
b7fae6c
ce754b7
26fb6f0
36c6e6e
fdc13dd
869ad16
bfc8f07
5a3c93b
da47193
ee4e554
54d25ce
3fdf0ef
a9606ef
fa26569
c455461
b16604c
66c7902
8af1e92
6ba17ef
dc0ab9a
28bddf1
25736e5
b91dffd
cd5b4af
69ee7ad
0abaeda
f643eed
8ae0b6e
1371cbd
3d52b9d
5d4e852
38ac205
7bb9358
8c8279c
508b265
d2a028b
02593f5
c56ac72
ebf8355
a2fd49a
d35e8bb
b5678af
e689719
29d80e0
9cb1fe3
b40ad2a
2234a9d
214a028
022362a
14e83ef
1d8374a
4a7c244
c10f23a
14c4555
5e3acad
af87f97
36d3cd8
5a76d57
4e314bf
c6b0d01
b333b43
8254180
14d2132
18140d4
2440a31
d4d3bb2
579decc
12bfb2f
508c7ce
d653f60
0d58fc9
5ac6a40
4367ef7
276a088
a7f5af5
5d8bb42
2aa62c3
11e1418
5cc5fcb
95d66f4
3eabd61
d582dac
c63fc3d
4c5aa18
5a5e7c6
590a99b
5169ba7
9f83466
e7cd048
e0173f7
778f705
e1f4901
d490ffd
ad1f928
c164451
a26a536
82ea005
f59f775
ee4db1b
56f6e5c
ebcd5df
20f0938
f66603f
ac33813
fabaeb5
62bbb6e
cec7cdf
e7e8b51
bcecdb5
16df6c7
23f87da
afed5cc
8a694e6
28ef6da
8ed429d
1672cab
af9f403
e7b65af
c3fe992
922ff74
f9325fb
d8e031f
2cbe7be
916d323
2491813
0f19ca0
2ff08ef
5e79ab4
88b9b34
2f23f5f
0a47638
4611bae
eff93c9
c0a9884
3033495
0b0bf41
5331250
ecb6d49
dfa8d0d
0f5696d
f3a0a4a
4e39219
6ead99d
fb3b073
07d351f
bcb2d80
4d89114
32de0a7
2242c5e
4519223
591b9e8
29333c2
b3ced77
a1a1188
2daa585
a73088e
da79074
d10c890
16aa6d8
fab3360
526ae1f
0cd9e9b
e1240e4
27a3eaf
c251b73
8b07b4a
2ab6067
2670eb1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ bin/ | |
|
||
/text-ui-test/ACTUAL.TXT | ||
text-ui-test/EXPECTED-UNIX.TXT | ||
src/main/java/META-INF/MANIFEST.MF |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# 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://via.placeholder.com/100.png?text=Photo) | Liang Kuan Hsien | [Github](https://github.com/KuanHsienn) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Lim Tze Kang | [Github](https://github.com/LTK-1606) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Glenn Chew | [Github](https://github.com/glenn-chew) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Jeremy Goh | [Github](https://github.com/jemehgoh) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | FU Yixuan | [Github](https://github.com/MatchaRRR) | [Portfolio](docs/team/yixuan.md) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,26 +4,83 @@ | |
|
||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | ||
|
||
## Design & implementation | ||
## Design | ||
|
||
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
<img src = "images/ArchitectureDiagram.png"> | ||
|
||
The *Architecture Diagram* given above provides the high-level design of the application. | ||
|
||
### Main components | ||
|
||
The application comprises the following components: | ||
* `Main`, which handles program startup and shutdown, and also interactions between other components. | ||
* `UI`, which handles user input and showing messages to the user. | ||
* `Storage`, which handles the loading and saving of data upon program startup and shutdown. | ||
* `Parser`, which converts user input into commands. | ||
* `Command`, which are executed to modify the data stored in the program. | ||
* `EventList`, which stores the program's data. | ||
|
||
### Interactions between components | ||
|
||
<img src = "images/ArchitectureSequenceDiagram.png"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on the textbook, the object deletion notation for Parser object to indicate the point at which it becomes ready to be garbage-collected should be marked with a cross with no lifeline after that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The lifeline after that is an issue with PlantUML. We will note that below the diagram. |
||
|
||
The above *Sequence Diagram* shows how the different components of the system interact with one | ||
another in the scenario when the command `add -e event -t 1200 -v venue` is executed. | ||
|
||
|
||
## Implementation | ||
|
||
This section describes some noteworthy details on how certain features are implemented. | ||
|
||
### List feature[TBD] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps can write [Proposed] for proposed implementation of list feature instead of using abbreviations such as TBD which may not be easily understood by everyone |
||
|
||
The `list` feature allows users to view all scheduled events in the system. | ||
It is implemented in the `ListCommand` class, which extends the base `Command` class and formats the output to display all events. | ||
Internally, the `list` operation does not modify any data but simply retrieves and displays the information from `EventList`. | ||
|
||
The `ListCommand` class performs the following key operations: | ||
|
||
* ListCommand#execute() — Generates a formatted message displaying all events in the list. | ||
|
||
These operations are accessible through the `Command` and can be invoked when the list command is entered by the user. | ||
|
||
Given below is an example usage scenario and the behavior of the list feature at each step: | ||
|
||
1. User Command Input: | ||
The user enters the command `list` to view all scheduled events. | ||
|
||
2. Command Recognition: | ||
The `COMMAND_WORD` is set to "list", enabling the system to recognize the command input and invoke `ListCommand`. | ||
|
||
3. Execution of ListCommand#execute(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should method calls be formatted as a code block (i.e. enclose with ``) as well? |
||
The `execute()` method retrieves each event from `eventList` and appends it to a formatted output message. | ||
It uses the `String.format` method with `LIST_MESSAGE` to include the total number of events in the message header. | ||
Events are appended to `outputMessage` with numbered formatting for readability. | ||
Comment on lines
+272
to
+273
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this be generalized as pseudocode? I.e. Does the developer need to know exactly how the message is created to understand how the feature wroks? |
||
|
||
4. Output Generation: | ||
The method stores the generated `outputMessage` in `this.message`, ready for display. | ||
|
||
|
||
## Product scope | ||
### Target user profile | ||
|
||
{Describe the target user profile} | ||
The target user: | ||
* has a need to organise a large number of events | ||
* organises small-scale events, such that he is able to handle all matters on his own | ||
* prefers typing to mouse interactions | ||
* is comfortable using a command-line interface | ||
|
||
### Value proposition | ||
|
||
{Describe the value proposition: what problem does it solve?} | ||
The user is able to organise and manage his events more quickly and efficiently than with a mouse/GUI app | ||
|
||
## User Stories | ||
|
||
|Version| As a ... | I want to ... | So that I can ...| | ||
|--------|----------|---------------|------------------| | ||
|v1.0|new user|see usage instructions|refer to them when I forget how to use the application| | ||
|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list| | ||
| Version | As a ... | I want to ... | So that I can ... | | ||
|---------|----------|--------------------------|--------------------------------------------------------| | ||
| v1.0 | new user | see usage instructions | refer to them when I forget how to use the application | | ||
| v2.0 | user | mark events as completed | easily track all past events | | ||
| v2.0 | user | mark participants present| know exactly who signed up but did not attend the event| | ||
|
||
## Non-Functional Requirements | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
@startuml | ||
'https://plantuml.com/sequence-diagram | ||
|
||
Participant ":Main" as main | ||
Participant ":Ui" as ui | ||
Participant ":Parser" as parser | ||
Participant ":AddCommand" as command | ||
Participant ":EventList" as eventList | ||
|
||
main -> ui : getCommand() | ||
activate ui | ||
ui --> main : "add -e event -t 1200 -v venue" | ||
deactivate ui | ||
|
||
create parser | ||
main -> parser : Parser() | ||
activate parser | ||
parser --> main : :Parser | ||
deactivate parser | ||
|
||
main -> parser : parseCommand("add -e event -t 1200 -v venue") | ||
activate parser | ||
|
||
create command | ||
parser -> command : AddCommand("event", "1200", "venue") | ||
activate command | ||
command --> parser : :AddCommand | ||
deactivate command | ||
|
||
parser --> main : command:AddCommand | ||
deactivate parser | ||
destroy parser | ||
|
||
main -> command : setData(events:EventList) | ||
activate command | ||
command --> main | ||
deactivate command | ||
|
||
main -> command : execute() | ||
activate command | ||
|
||
command -> eventList : addEvent("event", "1200", "venue") | ||
activate eventList | ||
eventList --> command | ||
deactivate eventList | ||
|
||
command --> main | ||
deactivate command | ||
|
||
main -> ui : showOutputToUser(command: Command) | ||
activate ui | ||
|
||
ui -> command : getMessage() | ||
activate command | ||
|
||
command --> ui : :String | ||
deactivate command | ||
|
||
ui --> main | ||
deactivate ui | ||
|
||
@enduml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@startuml | ||
'https://plantuml.com/class-diagram | ||
|
||
class Main { | ||
} | ||
|
||
Main --> Ui | ||
Main --> Storage | ||
Main --> EventList | ||
Main ..> Parser | ||
Main ..> Command | ||
|
||
class Ui { | ||
} | ||
|
||
Ui ..> Command | ||
|
||
class Parser { | ||
} | ||
|
||
Parser ..> Command | ||
|
||
class Storage { | ||
} | ||
|
||
Storage ..> EventList | ||
|
||
abstract class Command { | ||
} | ||
|
||
Command <|-- AddCommand | ||
Command <|-- ExitCommand | ||
Command <|-- ListCommand | ||
Command <|-- XYZCommand | ||
|
||
Command ..> EventList | ||
|
||
class EventList { | ||
} | ||
|
||
EventList *--> "*" Event | ||
|
||
Event *--> "*" Participant | ||
|
||
@enduml |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Event should have a constructor and multiple Objects such as UI, Parser and Event need to be shown as objects. eg. ui:UI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps can consider removing the acknowledgements section if you don't have sources to acknowledge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted, thanks for pointing this out!