Skip to content

Commit

Permalink
Merge pull request #267 from dohaduong/bug-timetable-peD
Browse files Browse the repository at this point in the history
add appendix: effort + manual testing for timetable
  • Loading branch information
c0j0s authored Apr 8, 2023
2 parents 01e9a47 + 61ce34f commit 163ec95
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 41 deletions.
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,35 @@
Duke Driver is a desktop app for managing delivery jobs and contacts. If you are looking to perform better at your delivery job, Duke Driver can assist you to finish your daily tasks more efficiently, according to your requirements.

Features
* Customers' contacts management system:
- View list of contacts of customers
- Add contact
- Delete contact
- Edit contact
- Find contact
- Clear all contacts
* Delivery tasking management system:
- View jobs
- Add jobs
- Delete jobs
- Edit jobs
- Find jobs
- Mark jobs as completed/uncompleted
- Mass import jobs from file
* Reminder and notifications:
- Set remainder for upcoming deadlines
- Get notified as soon as you open the app
- Add reminder
- View list of reminders
- Delete reminder
- Set reminder for upcoming deadlines/jobs
- Get notified of upcoming reminders and jobs as soon as you open the app
* Timetable:
- Displays timetable for the week specified by users
- Display timetable for the week specified by users
- Display lists of unscheduled and completed jobs
* Stats dashboard:
- List all jobs
- Show total number of jobs
- Show total number of all jobs, completed and pending jobs
- Show total earning
- Show total number of all jobs, completed and pending jobs for last week
- Show total earning for last week

------------------------------------------------------------------------------------------------------------------------------------------------------------------------
* This project is based on the AddressBook-Level3 project created by the [SE-EDU initiative](https://se-education.org).
93 changes: 66 additions & 27 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Refer to the guide [_Setting up and getting started_](SettingUp.md).

<div markdown="span" class="alert alert-primary">

:bulb: **Tip:** The `.puml` files used to create diagrams in this document can be found in the [diagrams](https://github.com/se-edu/addressbook-level3/tree/master/docs/diagrams/) folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams.
:bulb: **Tip:** The `.puml` files used to create diagrams in this document can be found in the [diagrams](https://github.com/AY2223S2-CS2103-F11-2/tp/tree/master/docs/diagrams/) folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams.
</div>

### Architecture
Expand Down Expand Up @@ -75,7 +75,7 @@ The **API** of this component is specified in [`Ui.java`](https://github.com/AY2

The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI.

The `UI` component uses the JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml)
The `UI` component uses the JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/AY2223S2-CS2103-F11-2/tp/blob/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/AY2223S2-CS2103-F11-2/tp/blob/master/src/main/resources/view/MainWindow.fxml)

The `UI` component,

Expand All @@ -87,7 +87,7 @@ The `UI` component,

### Logic component

**API** : [`Logic.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/logic/Logic.java)
**API** : [`Logic.java`](https://github.com/AY2223S2-CS2103-F11-2/tp/blob/master/src/main/java/seedu/address/logic/Logic.java)

Here's a (partial) class diagram of the `Logic` component:

Expand Down Expand Up @@ -118,7 +118,7 @@ How the parsing works:
* All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing.

### Model component
**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java)
**API** : [`Model.java`](https://github.com/AY2223S2-CS2103-F11-2/tp/blob/master/src/main/java/seedu/address/model/Model.java)

<img src="images/ModelClassDiagram.png" width="450" />

Expand All @@ -141,7 +141,7 @@ The `Model` component,

### Storage component

**API** : [`Storage.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/storage/Storage.java)
**API** : [`Storage.java`](https://github.com/AY2223S2-CS2103-F11-2/tp/blob/master/src/main/java/seedu/address/storage/Storage.java)

<img src="images/StorageClassDiagram.png" width="550" />

Expand All @@ -152,7 +152,7 @@ The `Storage` component,

### Common classes

Classes used by multiple components are in the `seedu.addressbook.commons` package.
Classes used by multiple components are in the `seedu.address.commons` package.

--------------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -238,8 +238,8 @@ The following activity diagram summarizes what happens when a user executes a ne
* Pros: Will use less memory (e.g. for `delete`, just save the person being deleted).
* Cons: We must ensure that the implementation of each individual command are correct.

### \[Proposed\] Timetable feature
#### Proposed Implementation
### Timetable feature
#### Implementation

Given below is an example usage scenario and how the timetable mechanism behaves at each step.

Expand Down Expand Up @@ -295,8 +295,8 @@ The following activity diagram summarizes what happens when a user executes a ne
* Pros: Will use less memory.
* Cons: We must ensure that the implementation of each individual command are correct.

### \[Proposed\] Statistics feature
#### Proposed Implementation
### Statistics feature
#### Implementation

Given below is an example usage scenario and how the statistics mechanism behaves at each step.

Expand Down Expand Up @@ -330,8 +330,8 @@ The following sequence diagram shows how the statistics operation works:

_{more aspects and alternatives to be added}_

### \[Proposed\] Delivery Job System
#### Proposed Implementation
### Delivery Job System
#### Implementation

Given below is an example usage scenario and how the update job mechanism behaves at each step. The other job system commands follow a similar excution pattern with their own command logics.

Expand Down Expand Up @@ -436,21 +436,22 @@ Design considerations:

Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unlikely to have) - `*`

| Priority | As a …​ | I want to …​ | So that I can…​ |
|----------|-----------------------------------------------------------------|----------------------------------------------|------------------------------------------------------------------------|
| `* * *` | new delivery driver and Duke Driver user | see usage instructions | refer to instructions when I forget how to use the App |
| `* * *` | delivery driver | add/delete jobs | keep track of my upcoming and old jobs |
| `* * *` | delivery driver | mark/unmark jobs | keep track of completed jobs |
| `* * *` | delivery driver | add a new person | keep in touch with my clients |
| `* * *` | delivery driver | delete a person | remove entries that I no longer need |
| Priority | As a …​ | I want to …​ | So that I can…​ |
|----------|-----------------------------------------------------------------|----------------------------------------------|-----------------------------------------------------------------------|
| `* * *` | new delivery driver and Duke Driver user | see usage instructions | refer to instructions when I forget how to use the App |
| `* * *` | delivery driver | add/delete jobs | keep track of my upcoming and old jobs |
| `* * *` | delivery driver | mark/unmark jobs | keep track of completed jobs |
| `* * *` | delivery driver | add a new person | keep in touch with my clients |
| `* * *` | delivery driver | delete a person | remove entries that I no longer need |
| `* * *` | organised delivery driver | find a person by name | locate details of persons without having to go through the entire list |
| `* * *` | forgetful person | be reminded of upcoming tasks and deadlines | complete all my jobs on time and not forget a task |
| `* * *` | organised user | be prepared for upcoming tasks and deadlines | plan for my next schedule |
| `* *` | busy person | view timetable of my tasks in a week | organise my timetable and complete everything on time |
| `* *` | delivery driver | hide private contact details | minimize chance of someone else seeing them by accident |
| `* *` | delivery driver who wants to learn how to maximise his earnings | view my aggregated information | track my earnings and other statistics |
| `*` | delivery driver with many customers in the address book | sort persons by name | locate a person/client easily and thus increase delivery efficiency |
| `*` | user | adjust how my notifications are shown | have a clutter free desktop |
| `* * *` | forgetful person | be reminded of upcoming tasks and deadlines | complete all my jobs on time and not forget a task |
| `* * *` | organised user | be prepared for upcoming tasks and deadlines | plan for my next schedule |
| `* * *` | busy person | view timetable of my tasks in a week | organise my timetable and complete everything on time |
| `* * *` | busy person | view list of completed and unscheduled jobs | keep track of my work |
| `* *` | delivery driver | hide private contact details | minimize chance of someone else seeing them by accident |
| `* *` | delivery driver who wants to learn how to maximise his earnings | view my aggregated information | track my earnings and other statistics |
| `*` | delivery driver with many customers in the address book | sort persons by name | locate a person/client easily and thus increase delivery efficiency |
| `*` | user | adjust how my notifications are shown | have a clutter free desktop |

### Use cases

Expand Down Expand Up @@ -701,7 +702,7 @@ testers are expected to do more *exploratory* testing.

1. Deleting a person while all persons are being shown

1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
1. Prerequisites: List all persons in Customers Window using the `list` command. Multiple persons in the list.

1. Test case: `delete 1`<br>
Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message.
Expand Down Expand Up @@ -763,3 +764,41 @@ has been activated.
1. Prerequisites: Assign a job to an appropriate timetable slot.
2. Test case: Once current time is 20 minutes before the next timetable slot (e.g. 10:40 to 10:59), a notification would pop up for the number of jobs assigned to the next timetable slot.

### Timetable

1. Display timetable for specific week containing a specific date from Main Window
1. Prerequisites: None.
2. Command: `timetable` (Show timetable of current week - LocalDate.now()) or `timetable date date/YYYY-mm-DD`. The date should not be left empty. Alternative, for `timetable` command, user can use GUI mode instead: Menu bar > Timetable > Scheduled jobs.
3. The output box in the window should show a message confirming that Timetable window is opened for the specific week containing the input date.
4. The system should open Timetable for the specific week, showing job list in respective day and slot (if there are any jobs for that day - else, the column for the day will be empty).

2. Display list of unscheduled jobs (i.e. jobs with invalid date and slot)
1. Prerequisites: None.
2. Command: `timetable_unscheduled` or GUI mode: Menu bar > Timetable > Unscheduled jobs.
3. The output box in the Main window should show a message confirming that Unscheduled job is opened for the specific week.
4. The system should open the Unscheduled Window, showing list of unscheduled jobs and total number of unscheduled jobs.

3. Display list of completed jobs
1. Prerequisites: None.
2. Command: `timetable_completed` or GUI mode: Menu bar > Timetable > Completed jobs.
3. The output box in the Main window should show a message confirming that Completed job is opened for the specific week.
4. The system should open the Completed Window, showing list of completed jobs and total number of completed jobs.

4. Display timetable for specific week containing a specific date from Timetable Window
1. Prerequisites: Opened Timetable window using `timetable` command from Main Window. Timetable of current week is shown in current Timetable Window.
2. Command: `timetable date date/YYYY-mm-DD`. The date should not be left empty.
3. The output box in the Timetable window should show a message confirming that Timetable window is opened for the specific week which contains the input date.
4. The system should display Timetable for the specific week, showing job list in respective day in the week and slot (if there are any jobs for that day - else, the column for the day will be empty).



### Appendix: Effort
As our application contains different windows and features, such as Timetable Window, Statistics Window, Reminder Window,.. - one challenge that we had to face was deciding on the UI and design of our app. We learnt to work with JavaFX to open different windows when needed, and decide on how to display each and every window that we have. This was quite challenging as we had to learn and design the structures of the windows and components so that it follows a good design principles. In order to make sure that Duke Driver is friendly to users who prefer typing, asides from including buttons on GUI mode, we tried to include commands for users to switch to different windows.

Moreover, AB3 code base only consists of features supporting only `Person` class, meanwhile for Duke Driver, we had to work with and update the code base to support different entity types - for example, `Delivery Job` and `Reminder`. With the extensions that we planned to do, we also had to update the Parser to support a much larger set of commands, as we were working with numerous commands from different windows (Timetable, Reminder, Statistics,...).

For Timetable Window, we wanted users to be able to structure their plans for the week, thus we added a Timetable feature. However, as Timetable is directly linked with the delivery job list, thus changes made in the existing functions could affect the features directly. Moreover, the implementation was also challenging as it required changes to the existing commands. We also had to decide on the design of the Timetable Window, and learn to use the `ListView` class in our timetable.

Overall, the Team Project for us was quite challenging, as it requires us to learn to work together and help each other. We had to divide the work among ourselves so that everyone can get a grasp of and understand the code base. Understanding and updating the code base was quite tough at first, due to high levels of abstraction and the amount of classes that AB3 has. We tried to break it down into small tasks and understand it little by little each week. These small improvements day-by-day helped us get used to the codebase and the workload eventually.

We also learnt to work as a team and contributed, reviewed and helped to debug each other's work through weekly meetings and constant updates. Distributing the work and assigning small task to each member helped us gain more confidence throughout the project.
8 changes: 0 additions & 8 deletions docs/diagrams/UiClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ Class DeliveryJobListPanel
Class AddressBookDialog
Class StatusBarFooter
Class CommandBox

Class ReminderListWindow
Class TimeTableWindow
Class StatisticsWindow
Class UnscheduleWindow
Class CompleteWindow
Class AddressBookWindow
Class AddDeliveryJobWindow
}

package Model <<Rectangle>> {
Expand Down
Binary file modified docs/images/UiClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/team/dohaduong.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Given below are my contributions to the project.
* Added user stories, use cases and glossary (PR #20, #23, #34)

* **Community**:
* PRs reviewed (with non-trivial review comments): #180, #156
* PRs reviewed (with non-trivial review comments): #180, #156, #264
* Identified bugs in commands and brought up discussion among the group in weekly meeting
* Contributed to forum discussions (examples: #24)

Expand Down

0 comments on commit 163ec95

Please sign in to comment.