PROJECT: Codeducator


Overview

Codeducator is a desktop address book application for private programming language tutors. Users are able to track the progress of their students, manage their tutoring schedule and other important information about their students.

Codeducator has a graphical user interface built with JavaFX but most of the user interactions are done using command line interface. It is written in Java and has about 10 kLoC.

This project is based on the AddressBook-Level4 created by the SE-EDU initiative.

Summary of contributions

  • Major enhancement: added a dashboard feature

    • What it does:

      • The dashboard aims to help tutors track the progress of each of their student.

      • Each student will have a dashboard.

      • Tutors are able to add milestones they want their students to achieve to their dashboards. Each milestone signifies a significant accomplishment in the development of the student’s learning progress.

      • Tutors are able to add a list of tasks to each milestone. A task is a piece of work that needs to be done to be closer to achieving the milestone.

      • Tutors are able to mark each task as completed, which updates the progress of the milestone.

      • Tutors are able to delete milestone and delete task.

    • Justification: Besides managing their student contacts, tutors will also need to manage the learning progress of their students so that they can tutor them better. If they have a large number of students they tutor, it is hard to keep track of what needs to be done for each of them. Hence, this feature not only allows tutors to manage both their student contacts and student progress all in one place, it also provides them ease in documenting and tracking their students' learning development.

  • Minor enhancement: added a favourites feature

    • What it does: Allows users to add students to favourites and view the list of students in favourites.

    • Justification: Tutors may have some students that they wish to take note of. This feature helps tutors highlight these students and access them easily.

  • Code contributed: [Functional code] [Test code]

  • Other contributions:

    • Project management:

      • Managed release v1.4 on GitHub

    • Documentation:

      • Did cosmetic tweaks to existing contents of the Developer Guide: #167

    • Community:

      • PR reviewed: #174

      • Reported bugs for another team: 1, 2, 3, 4

    • Others:

      • Refactored the name of some classes in the context of Codeducator (changed the name of Person to Student and Subject to ProgrammingLanguage): #27

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.

Dashboard

In Codeducator, you can track the learning progress of your students easily by utilising our Dashboard feature. Each of your student in your contact list has their own dashboard which you can view and manage easily.

What’s in a dashboard?

  • Milestones:
    Each dashboard will have a list of milestones. A milestone signifies a major step in the learning progress of your student. Codeducator allows you to create and add milestones in your students' dashboards so that you can keep track of learning objectives you have set for them.

  • Tasks:
    Each milestone can contain a list of tasks. A task signifies a piece of work to be done to meet the milestone’s objective. Codeducator allows you to create and add tasks to each milestone so that you can keep track of what has already been done and what still needs to be done to reach the milestone.

DashboardScreenshot
Figure 1. An example of a student’s dashboard

Showing the dashboard of a student: showDB

You can view the dashboard of a student by using the showDB command.

Format: showDB STUDENT_INDEX

  • STUDENT_INDEX refers to the index number of the student shown in the most recent listing.

  • STUDENT_INDEX must be a positive integer 1, 2, 3, …​

Example:

  • list
    showDB 1
    Shows the dashboard of the 1st student in the address book.

Steps taken to show the dashboard of a student

Step 1: First, find the student whose dashboard you wish to view using the list command (see [Listing all students : list]).

Step 2: Once you have found the student, type showDB into the command box, followed by the STUDENT_INDEX of the student in the list. Press Enter to execute it.

showDB1 screenshot
Figure 2. Entering the showDB command followed by the STUDENT_INDEX 1 of the student whose dashboard you wish to view

Step 3: You have succeeded in viewing the student’s dashboard if you see the message "Selected Dashboard of Student: STUDENT_INDEX " in the result box, with the dashboard containing the student’s name appearing on the right panel.

showDB2 screenshot
Figure 3. Success in showing the dashboard of Alex Yeoh who has the index 1 on the students list
The student INDEX provided must be valid. Otherwise, an error message "The student index provided is invalid" will be displayed in the result box at Step 3.
showDB3 screenshot
Figure 4. Error message displayed when an invalid STUDENT_INDEX 10 is entered. There are less than 10 students in the student contact list.

Adding a milestone to a student’s dashboard: addMS

If you want to keep track of a learning objective you want your student to fulfil, you can add a milestone to your student’s dashboard using the addMS command.

Format: addMS i/STUDENT_INDEX d/MILESTONE_DUE_DATE o/DESCRIPTION_OF_MILESTONE

  • STUDENT_INDEX refers to the index number of the student shown in the most recent listing.

  • STUDENT_INDEX must be a positive integer 1, 2, 3, …​

  • MILESTONE_DUE_DATE must be in this format: DD/MM/YYYY hh:mm where DD/MM/YYYY is the calendar date and hh:mm is the time in 24-hour notation

  • MILESTONE_DUE_DATE can be a date in the past (before the current day)

Example:

  • list
    showDB 1
    addMS i/1 d/23/05/2018 23:59 o/Learn Arrays
    Adds a milestone to the dashboard of the 1st student in the address book. The milestone is due on 23/05/2018 23:59 and the objective is "Learn Arrays".

Steps taken to add a milestone to a dashboard

Step 1: First, view the dashboard of the student where you want to add the milestone to (see [Show the dashboard of a student: showDB]).

Step 2: Once you can view the student’s dashboard, type addMS in the command box, followed by the STUDENT_INDEX, MILESTONE_DUE_DATE and DESCRIPTION_OF_MILESTONE. Press Enter to execute it.

addMS1 screenshot
Figure 5. Entering the addMS command, followed by the STUDENT_INDEX as "1", MILESTONE_DUE_DATE as "23/05/2018 23:59" and DESCRIPTION_OF_MILESTONE as "Learn Arrays"

Step 3: You have succeeded in adding the milestone to the student’s dashboard if you see the message "Milestone added to Student’s Dashboard:" followed by the description of the milestone you have added in the result box. The new milestone will also appear on the student’s dashboard.

addMS2 screenshot
Figure 6. Success in adding the milestone with the description "Learn Arrays" which is due on "23/05/2018 23:59" to the dashboard of Alex Yeoh. Alex Yeoh has the index 1 on the students list.
The STUDENT_INDEX provided must be valid. Otherwise, an error message "The student index provided is invalid" will be displayed in the result box at Step 3.
addMS3 screenshot
Figure 7. Error message displayed when an invalid STUDENT_INDEX 10 is entered. There are less than 10 students in the student contact list.
The MILESTONE_DUE_DATE provided must have a valid calendar date and follows the specified format. Otherwise, an error message shown in the figure below will be displayed in the result box at Step 3.
addMS4 screenshot
Figure 8. Error message displayed when an invalid MILESTONE_DUE_DATE "31/02/2018 23:59" is entered. There is no 31/02/2018 in the calendar.

Deleting a milestone from a student’s dashboard: deleteMS

If you wish to remove a milestone you no longer need from a student’s dashboard, you can use the deleteMS command.

Format: deleteMS i/STUDENT_INDEX m/MILESTONE_INDEX

  • The milestone is in the dashboard of a student at the specified STUDENT_INDEX

  • STUDENT_INDEX refers to the index number of the student shown in the most recent listing.

  • MILESTONE_INDEX refers to the index number of the milestone in the dashboard shown in the most recent listing.

  • Both STUDENT_INDEX and MILESTONE_INDEX must be positive integers 1, 2, 3, …​

Examples:

  • list
    showDB 1
    deleteMS i/1 m/1
    Deletes the 1st milestone from the dashboard of the 1st student in the address book.

Steps taken to delete a milestone from a dashboard

Step 1: First, view the dashboard of the student where you want to remove the milestone from (see [Show the dashboard of a student: showDB]).

Step 2: Once you can view the student’s dashboard, type deleteMS in the command box, followed by the STUDENT_INDEX and MILESTONE_INDEX. Press Enter to execute it.

deleteMS1 screenshot
Figure 9. Entering the deleteMS command, followed by the STUDENT_INDEX as "1" and MILESTONE_INDEX as "1"

Step 3: You have succeeded in deleting the milestone if you see the message "Deleted milestone:" followed by the description of the milestone in the result box. The milestone will also no longer be on the dashboard of the student.

deleteMS2 screenshot
Figure 10. Success in deleting the milestone of index 1 in the dashboard of Alex Yeoh. Alex Yeoh has the index 1 on the students list.
The STUDENT_INDEX and MILESTONE_INDEX provided must be valid. Otherwise, an error message "One or more of the provided indexes are invalid" will be displayed in the result box at Step 3.
deleteMS3 screenshot
Figure 11. Error message displayed when invalid STUDENT_INDEX "10" and MILESTONE_INDEX "10" are entered

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.

Dashboard feature

The dashboard feature aims to help users keep track of their students' learning progress.

Current Implementation

To have a dashboard for each student, an association with a new Dashboard class is added to the Student class. We have also created new classes associated with the Dashboard class to facilitate the different capabilities of the dashboard. The following diagram shows the class diagram of the components that facilitate the dashboard feature:

ModelComponentDashboardClassDiagram
Figure 12. Class diagram of the components that facilitate the dashboard feature

Both UniqueMilestoneList and UniqueTaskList contain an attribute called "internalList" which are ObservableList<Milestone> and ObservableList<Task> respectively. This means that the UI can be bound to both of the lists so that it can automatically update when the data in any of the lists change.

A new Dashboard object is created every time a new Student is being created. The Dashboard object will contain an empty milestone list until the user adds new milestones to the dashboard. This enforces 1-to-1 association between Student and Dashboard, as well as between Dashboard and UniqueMilestoneList.

For example, the constructor for Student is implemented this way:

    public Student(Name name, Phone phone, Email email, Address address, ProgrammingLanguage programmingLanguage, Set<Tag> tags) {
        requireAllNonNull(name, phone, email, address, tags);
        this.name = name;
        this.phone = phone;
        // ... initialise the rest of the attributes ...
        this.dashboard = new Dashboard();
    }

The constructor for Dashboard is implemented this way:

    public Dashboard() {
        milestoneList = new UniqueMilestoneList();
    }
Implementation for commands that modify the Dashboard

The AddMilestoneCommand, AddTaskCommand, CheckTaskCommand and ShowDashboardCommand commands facilitate operations to the dashboard. A common implementation for commands that modify the dashboard (e.g. AddMilestoneCommand) is that a new copy of Dashboard is created with the new modification.

For example, in the AddMilestoneCommand, to add a new milestone object to the dashboard of a Student Object called "targetStudent":

  1. AddMilestoneCommand.preprocessUndoableCommand() calls the AddMilestoneCommand.createEditedStudent() method which will create a Student object called "editedStudent". "editedStudent" is created with the same attributes of "targetStudent", but with a new Dashboard object containing the new milestone.
    AddMilestoneCommand.createEditedStudent() is implemented as such:

    private void createEditedStudent() throws DuplicateMilestoneException {
        requireAllNonNull(studentToEdit, newMilestone);
        editedStudent = new StudentBuilder(targetStudent).withNewMilestone(newMilestone).build();
    }
  1. In the AddMilestoneCommand.executeUndoableCommand() method, Model.updateStudent(Student, Student) is called to replace "targetStudent" with "editedStudent" in the Address Book in-memory.

Implementation for displaying the dashboard

The ShowDashboardCommand facilitates the displaying of a student’s dashboard. The ShowDashboardCommand.execute() method is implemented this way:

    public CommandResult execute() throws CommandException {
        // ... check whether targetIndex is valid ...
        EventsCenter.getInstance().post(new ShowStudentDashboardEvent(lastShownList.get(targetIndex.getZeroBased())));
        // ... return command result ...
    }

As seen from the above code snippet, ShowDashboardCommand.execute() raises a ShowStudentDashboardEvent. The sequence diagram below shows how the EventsCenter reacts to that event.

ShowDashboardCommandSequenceDiagram
Figure 13. Sequence diagram showing how the the EventsCenter and the Ui components react to the ShowDashboardCommand

As seen from the above diagram,

  1. InfoPanel handles the ShowStudentInDashboard event.

  2. InfoPanel then raises the ShowStudentNameInDashboard which is handled by DashboardPanel to display the name of the student in the dashboard.

  3. Finally, InfoPanel raises the ShowMilestoneEvent which is also handled by DashboardPanel to display the milestones of the student in the dashboard.

Design Considerations

Aspect Alternatives Pros (+)/ Cons(-)

Aspect: Data structure to support the dashboard feature

Add a Dashboard association to Student (current choice)

+ : Able to access the dashboard of a student easily.

- : Since Student is immutable, a new Student object has to be created each time its Dashboard is modified.

Add a new UniqueDashboardList association to AddressBook

+ : Able to modify the dashboard easily if it is not made immutable.

- : We will have to sync the UniqueDashboardList with the UniqueStudentList since Dashboard will be associated to a Student.