Overview
Bank Address Book (BankAB) is a business process management and workflow application platform, whereby its users are all the employees in a banking environment. This platform supports the basic daily routine of each employee such as:
-
Checking working schedule
-
Applying for leave application
-
Checking in and out during working hours
The managers and administrators will have higher priority access level of BankAB such as changing the priority level of the employee and approve or reject leave requests.
Summary of contributions
-
Major enhancement: implemented scheduling system.
-
What it does: This allows all users to have a unique schedule to be updated on where and when to work for the day.
-
Justification: This feature is a core component of the product as certain functions (such as leave application), require user authentication. Both command can be executed by any user to view and set their own schedule. However, a user with priority level of
ADMINISTRATOR
is needed to view and set schedule for others. -
Highlights: This is the only variable within a
Person
object that is more OOP oriented asSchedule
is an object that contains 3 variables:TimeStart
,TimeEnd
andVenue
. When aPerson
object is first created, theSchedule
object can be null if not defined. Calling thetoString()
method will return either the details of theSchedule
in string format or thenullPointerException
will return'No schedule is allocated'
.
-
-
Code contributed: Code Dashboard
-
Other contributions:
Contributions to the User Guide
Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users. |
Scheduling
List schedule: schedule
List schedule for the employee.
Format: schedule INDEX
|
Example: schedule 1
Sample output:
Set schedule: setschedule
Set schedule of the employee.
Format: setschedule INDEX ts/TIME_START te/TIME_END v/VENUE
|
Examples:
-
setschedule 1 ts/1100 te/1600 v/Toilet
-
setschedule 2 ts/2200 te/0800 v/Main Door
Contributions to the Developer Guide
Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project. |
Schedule Feature
Implementation
The setschedule
is a command that set a particular department employee’s schedule.
The setschedule
mechanism is facilitated by the SetScheduleCommandParser
, which parses input arguments and creates a new SetScheduleCommand
object.
The SetScheduleCommandParser
, which implements the Parser
interface, parses the arguments inputted in to the CLI, and checks if the user input conforms the expected format.
Code snippet from SetScheduleCommandParser.java
that shows the parsing of arguments and checking for invalid arguments:
public SetScheduleCommand parse(String args) throws ParseException {
...
...
EditPersonDescriptor editPersonDescriptor = new EditPersonDescriptor();
if (argMultimap.getValue(PREFIX_TIME_START).isPresent()
&& argMultimap.getValue(PREFIX_TIME_END).isPresent()
&& argMultimap.getValue(PREFIX_VENUE).isPresent()) {
Schedule schedule = ParserUtil.parseSchedule(
argMultimap.getValue(PREFIX_TIME_START).get(),
argMultimap.getValue(PREFIX_TIME_END).get(),
argMultimap.getValue(PREFIX_VENUE).get());
Set<Schedule> scheduleList = new HashSet<>();
scheduleList.add(schedule);
editPersonDescriptor.setSchedule(scheduleList);
}
...
...
}
The sequence diagram below demonstrates parse()
function of SetScheduleCommandParser
:
The sequence diagram below demonstrates execute()
function of SetScheduleCommand
:
Design Considerations
Aspect: Storage for schedule
-
Alternative 1 (current choice): Store with AddressBook XML.
-
Pros: Easier to implement (able to add onto existing parser).
-
Cons: May require extra parameters to create a Person object.
-
-
Alternative 2: Store in a different XML file.
-
Pros: Easy to implement (duplicate existing parser but for different XML file).
-
Cons: Consumes extra time to delete schedule when a particular person is deleted.
-
-
Alternative 3: Store in a different file format.
-
Pros: Easier to understand.
-
Cons: Consumes extra time to implement different parser from scratch.
-
Scheduling
List schedule
-
Lists the schedule of an employee in address book as a non-administrator.
-
Prerequisites: Logged in as any non-administrator user and is listed at index 4.
-
Test case:
schedule 4
Expected: Displays own schedule. Details of schedule shown in status message. -
Test case:
schedule 3
Expected: User has invalid priority level. Error details shown in status message. -
Test case:
schedule 0
Expected: Index 0 is invalid. Error details shown in status message.
-
-
Lists the schedule of an employee in address book as an administrator.
-
Prerequisites: Logged in as any administrator and is listed at index 1.
-
Test case:
schedule 1
Expected: Displays own schedule. Details of schedule shown in status message. -
Test case:
schedule 3
Expected: Displays schedule of employee at index 3. Details of schedule shown in status message. -
Test case:
schedule 0
Expected: Index 0 is invalid. Error details shown in status message.
-
Set schedule
-
Sets the schedule of an employee in address book as a non-administrator.
-
Prerequisites: Logged in as any non-administrator user and is listed at index 4.
-
Test case:
setschedule 4 ts/0900 te/1700 v/Level 5
Expected: Successfully set own schedule. Message is shown in the status message. -
Test case:
setschedule 3 ts/0900 te/1700 v/Level 5
Expected: User has invalid priority level. Error detail shown in the status message. -
Test case:
setschedule 4 ts/0900 te/0900 v/Level 5
Expected: Time start and time end are the same. Error detail shown in the status message.
-
-
Sets the schedule of an employee in address book as an administrator.
-
Prerequisites: Logged in as any administrator and is listed at index 1.
-
Test case:
setschedule 1 ts/0900 te/1700 v/Level 5
Expected: Successfully set own schedule. Message is shown in the status message. -
Test case:
setschedule 3 ts/0900 te/1700 v/Level 5
Expected: Successfully set schedule for employee at index 3. Message is shown in the status message. -
Test case:
setschedule 4 ts/0900 te/0900 v/Level 5
Expected: Time start and time end are the same. Error detail shown in the status message.
-