Overview
ClubHub is a desktop application for Club leaders or managers to manage their club. The user interacts with the program using a Command Line Interface (CLI), and it has a Graphic User Interface (GUI) created with JavaFX. It is written in Java and has about 10 thousand lines of codes.
Summary of Contributions:
-
Major enhancement: generate a calendar to record and manage events
-
Event
-
An event contains four elements: name, venue, description, and date.
-
-
addEvent
-
What it does: It allows users to add an event to the ClubHub.
-
Justification: We design this command because it is necessary to add and event to the ClubHub to generate a event list, which can also be called as calendar If users want to use the it later.
-
Highlights: This command is the most basic command but the most significant one.
-
Example:
addEvent n/meeting v/meeting room D/be punctual d/10/12
---Add an event namedmeeting
, venue ismeeting room
, description isbe punctual
, date is10/12
.
-
-
deleteEvent
-
What it does: It allows users to delete a certain event.
-
Highlights: This command is necessary for users when they made a mistakes and want to delete a certain event.
-
Example:
delete 1
--- Delete the event whose index is 1.
-
-
editEvent
-
What it does: It allows users to edit a existing event in the event list.
-
Example:
editEvent 1 n/meeting v/university town D/bring your materials d/10/12
---Edit the event who’s index is 1.
-
-
listEvent
-
What it does: It allows users to list all the events in the ClubHub.
-
Example:
listEvent
-
-
Code contributed [functional code] [test code]
-
Other contribution
-
Fixed many checkstyle errors in our team(Pull Request #102, #96, #64).
-
Fix some bus of my teammate. (example: change the date format from “[0-2][0-9]||3[0-1]/1[0-2]||[0-9]” to “0[1-9]||[1-2][0-9]||3[0-1]/[1[0-2]||0[1-9]” .
-
Contributions to forum discussion.
-
-
Contribution to User Guide
Calendar
List events: listEvent
Lists all the events sorted by date.
Format: listEvent
Example:
* listEvent
List all the events in the ClubHub.
Adding an event: addEvent
Adds an event to the calendar.
Format: addEvent n/EVENT_NAME v/VENUE D/DESCRIPTION d/EVENT_DATE
The Event name cannot be the same as an existing one (Two events are regarded as the same when they have the same name and date). |
Example:
-
`addEvent n/Basketball training v/MPSH3 D/Bring your own basketball d/10/12
Editing an event: editEvent
Edits an existing event in the ClubHub.
Format: editEvent INDEX n/EVENT_NAME v/EVENT_VENUE D/EVENT_DESCRIPTION d/EVENT_DATE
Example:
-
editEvent 1 n/Basketball training v/Sports Center D/bring your own basketball d/12/12
Edit the venue and the date of the 1st event toSports Center
and12/12
respectively.
Deleting event: deleteEvent
Deletes an existing event from the ClubHub.
Format: deleteEvent [INDEX]
.
Example:
-
deleteEvent 1
Delete the event who’s index is 1.
Contribution to Developer Guide
Events
We create an Events package in model, to combine the event element such as name and venue into an event list. In the Commands package, we create an package named EventCommand, which the commands are stored in. We have totally four commands:
-
addEventsCommand
— Add a new event to the event list. -
editEvent
— Change the information of the existing event. -
listEvent
— List all the existing events. -
deleteEvent
— Delete the a certain event.
The AddEvent/DeleteEvent mechanism is facilitated by AddressBook
.
It extends AddressBook
with the AddEvent
and DeleteEvent
methods, and implements the following operations:
-
AddressBook#addEvent()
— Adds anEvent
object to theUniqueEventList
. -
AddressBook#deleteEvent()
— Removes anEvent
object from theUniqueEventList
.
These operations are exposed in the Model
interface as Model#addEvent()
and Model#removeEvent()
respectively.
Below is a scenario of how a user adds an Event
into the club book.
Step 1. The user inputs the command addEvent n/[eventName] v/[eventVenue] D/[eventDescription] d[eventDate] into the command box.
Step 2. The CommandBox
UI will create a Logic
object which parses the command to ascertain that it is an addEvent
command.
Step 3. The AddressBookParser
will then parse the command to create a new addEventParser
object.
Step 4. This addEventParser
will parse the arguments of the command line and create a new AddEvent
object.
Step 5. This will then be put into the model
, into the VersionedAddressBook
.
The Event
class creates an object that instantiates an EventName
object, an EventVenue
, an EventDescription
and an EventDate
objects. The multiple Event
objects created will be stored in a UniqueEventList
, where the uniqueness of every Event
is in its EventName
.
This uniqueness is attained by comparing the EventName
object in the Event
to be added and the Event’s already in the `UniqueEventList
using the getEventName()
method in Event
.
Events
We create an Events package in model, to combine the event element such as name and venue into an event list. In the Commands package, we create an package named EventCommand, which the commands are stored in. We have totally four commands:
-
addEventsCommand
— Add a new event to the event list. -
editEvent
— Change the information of the existing event. -
listEvent
— List all the existing events. -
deleteEvent
— Delete the a certain event.
The AddEvent/DeleteEvent mechanism is facilitated by AddressBook
.
It extends AddressBook
with the AddEvent
and DeleteEvent
methods, and implements the following operations:
-
AddressBook#addEvent()
— Adds anEvent
object to theUniqueEventList
. -
AddressBook#deleteEvent()
— Removes anEvent
object from theUniqueEventList
.
These operations are exposed in the Model
interface as Model#addEvent()
and Model#removeEvent()
respectively.
Below is a scenario of how a user adds an Event
into the club book.
Step 1. The user inputs the command addEvent n/[eventName] v/[eventVenue] D/[eventDescription] d[eventDate] into the command box.
Step 2. The CommandBox
UI will create a Logic
object which parses the command to ascertain that it is an addEvent
command.
Step 3. The AddressBookParser
will then parse the command to create a new addEventParser
object.
Step 4. This addEventParser
will parse the arguments of the command line and create a new AddEvent
object.
Step 5. This will then be put into the model
, into the VersionedAddressBook
.
The Event
class creates an object that instantiates an EventName
object, an EventVenue
, an EventDescription
and an EventDate
objects. The multiple Event
objects created will be stored in a UniqueEventList
, where the uniqueness of every Event
is in its EventName
.
This uniqueness is attained by comparing the EventName
object in the Event
to be added and the Event’s already in the `UniqueEventList
using the getEventName()
method in Event
.
-
Design considerations
-
Aspect: implementation of listEvent
-
Alternative 1 (current choice): list all the events in the event list.
-
It will list all the events with the index order 1,2,3…
-
-
Alternative 2 : list all the events sorted by date.
-
It will sort the events with their date and list all of them out.
-
-
-