PROJECT: Teacher’s Notebook


Overview

Teacher’s Notebook is a desktop application used by teachers to manage their classes and provides them with reminders for lessons. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.

Teacher’s Notebook serves as a one-stop platform to consolidate all the information that teachers will need, that is information about students, assignments, classes and lessons.

Summary of contributions

  • Major enhancement: added the ability to undo/redo previous commands

    • What it does: allows the user to undo all previous commands one at a time. Preceding undo commands can be reversed by using the redo command. The undo redo commands are only usable after a command that changes the state of the notebook is executed.

    • Justification: This feature improves the product significantly because a user can make mistakes in commands and the app should provide a convenient way to rectify them.

    • Highlights: This enhancement affects existing commands and commands to be added in future. There were many considerations when implementing this undo/redo to allow users a better user experience when doing the command.
      The implementation was very challenging as one command had to be suited for various types of actions that could be executed in our app, and there were different kinds of dependencies that had to be accounted for during the execution of undo/redo command.

    • Credits: Idea was inspired from the Memento Design Pattern, a software design pattern to restore objects to their previous states. The idea became more concrete as I saw the example UML diagram used for undo/redo commands from AB3.

  • Minor enhancement:

    • Added a getgrades and getunsubmitted command to retrieve students grades and unsubmitted assignments respectively.

    • Refactored the code from AB3 with persons, to students and added in additional fields (MedicalConditions, ParentPhone).

    • Added various CRUD commands - FindAssignmentCommand, DeleteClassroomCommand etc and improved on peers codes.

  • Code contributed: [Functional Code] [RepoSense]

  • Other contributions:

    • Project management:

      • Managed releases v1.1 - v1.3 (4 releases) on GitHub

      • Added Travis, Coveralls and AppVeyor support for the team

      • Gave comments to peers before merging PRs.

      • Helped to make overall code base neater with comments and removed unnecessary methods. (Pull request #202)

      • Helped to merge and fix all merge conflicts among the PRs in the team (Pull request #60)

    • Enhancements to existing features:

      • Retrieving specific students grades and updating grades individually (Pull request #84)

      • Added ability to edit assignments (Pull request #91)

      • Proper time parsing for dates and times (Pull request #83)

      • Wrote additional tests to the current project to increase coverage (Pull request #186 increased coverage by 12.6%).

    • Documentation:

      • Did cosmetic tweaks to existing contents of the User Guide so that they are more coherent: (Pull request #88)

      • Made changes to the current puml diagrams from AB3 to suit our current project: (Pull request #185)

      • Changed the undo redo implementation feature from AB3 to suit the current project’s undo redo: (Pull request #67)

    • Community:

      • PRs reviewed (with non-trivial review comments): (Pull request #110, #37)

      • Reported bugs and suggestions for other teams in the class during PE dry run (examples: 1, 2, 3)

Contributions to the User Guide

Given below are some of the sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

Students

Students are contained within each classroom. There are several fields in each student as shown below:

  • Name - Prefix: n/

    • Names must be alphanumerical, and cannot be empty.

  • Email - Prefix: e/

  • Phone - Prefix: p/

    • Phone numbers must be at least 3 digits, and must only contain digits.

  • Address - Prefix: a/

    • Address must be alphanumerical, and cannot be empty.

  • Parent Phone - Prefix: pp/

    • Parent phone numbers must be at least 3 digits, and must only contain digits.

  • Medical Conditions - Prefix: m/

    • Medical conditions must be alphanumerical. This is an optional field.

  • Tags - Prefix: t/

    • Tags must be alphanumerical. This is an optional field that can be used multiple times.

  • DisplayPicture - Prefix: none

    • Display pictures must be in PNG file format. A default display picture is set for each student.

Adding Student: addstudent

Adds a student to the student list of the current class.
Format: addstudent n/NAME e/EMAIL p/PHONE a/ADDRESS pp/PARENT_PHONE [m/MEDICAL_CONDITIONS]…​ [t/TAG]…​

Examples:

  • addstudent n/John Doe e/johndoe@gmail.com p/81930042 a/Jurong East Avenue 3 Blk 639 #12-02 pp/84295512 m/Sinus

  • addstudent n/Jane Doe e/janedoe@hotmail.com p/91823051 a/Tampinese Avenue 5 Blk 772 #02-84 pp/99811241 t/PE Rep t/Naughty

Editing Student: editstudent

Edits a student at the specified index in the student list of the current class.
Format: editstudent STUDENT_INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [pp/PARENT_PHONE] [m/MEDICAL_CONDITIONS], [t/TAG]…​

Examples:

  • editstudent 2 p/98510293 e/jonathan@example.com

  • editstudent 4 n/Xavier Lim

The index provided must be valid (is an integer and exists in the student list) and at least one field must be edited. If the list has been filtered through the Finding Student command, the index provided corresponds to the index on the filtered list.

Deleting Student: deletestudent

Deletes a student at the specified index in the student list of the current class.
Format: deletestudent STUDENT_INDEX

Example:

  • deletestudent 5

The index provided must be valid (is an integer and exists in the student list) If the list has been filtered through the Finding Student command, the index provided corresponds to the index on the filtered list.

Listing Students: liststudents

Lists all the students in the current classroom. Format: liststudents

Finding Student: findstudent

Find students whose name matches a given keyword in the current classroom.
Format: findstudent STUDENT_NAME

Examples:

  • findstudent John Doe

  • findstudent Jane Doe

Uploading: upload

Allows a user to upload a PNG/JPG file to set the display picture of the student at the specified index in the student list of the current class.
Upon entering the command, a window will popup as shown below:

500

And the user will be prompted to select a PNG/JPG file from their computer to set as the new display picture of the student.
The user may cancel the upload operation by clicking on cancel in the window that pops up.

Format: upload STUDENT_INDEX

Example:

  • upload 3

The index provided must be valid (is an integer and exists in the student list). If the list has been filtered through the Finding Student command, the index provided corresponds to the index on the filtered list. The directory of the image uploaded is assumed to not change. If the image is moved or deleted after it is set as the display picture, the display picture will be empty when the user starts up Teacher’s Notebook.

Resetting display picture

Resets the display picture of the student to the default.

Format: resetdisplaypic

Example:

  • resetdisplaypic

Get Grades: getgrades

Gets all the grades of the chosen student index in the current classroom.
The command result will show all the grades of the specified student.
Format: getgrades STUDENT_INDEX

Example:

  • getgrades 1

Get Unsubmitted Assignments: getunsubmitted

Gets all the unsubmitted assignments in the current classroom.
The command result will unsubmitted assignments with the corresponding student names.
Format: getunsubmitted

Undo/Redo: Undo/Redo

Restores the database to the state before the previous undoable command was executed.

Undoable commands are commands that modify the database’s content: add, delete edit, clear, upload.

Undo/redo cannot, however, undo actions made during previous activation of Teacher’s Notebook.
This is to say, once the application is closed, all actions done cannot be undone.

Format: undo or redo

Examples:

  • deletestudent 1 + undo (reverses the delete 1 command)
    redo (applies the delete command again)

  • liststudents + undo (Error message displayed as no changes made to database)

Reminders for Assignments [coming in v2.0]

Assignments can be added to the reminders for the notebook, where users will be alerted when the deadline is up for assignments.
Once the deadline is over, the assignments will be removed from the reminder panel, but will remain in the assignment list for future reference.
This will give teachers a clearer idea of what they need to do in the reminder panel beyond just lessons.

Statistics for Assignments [coming in v2.0]

Calculates the statistics for the chosen assignment for each classroom - Average, Median, 25th / 75th percentile etc.
This will give teachers a clearer idea of how each classroom as a whole is doing.
Format: getstats ASSIGNMENT_INDEX

Contributions to the Developer Guide

Given below are some of the 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.

Model component

ModelClassDiagram
Figure 1. Structure of the Model Component

API : Model.java

The Model,

  • stores a UserPref object that represents the user’s preferences.

  • stores the Notebook data.

  • saves the state of the Notebook after each change in state for undo redo function.

  • exposes an unmodifiable ObservableList<Classroom>, ObservableList<Student>, ObservableList<Assignment>, and ObservableList<Lesson> that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.

  • does not depend on any of the other three components.

As a more OOP model, we can store a Tag list in Classroom, which Student can reference. This would allow Classroom to only require one Tag object per unique Tag, instead of each Student needing their own Tag object. An example of how such a model may look like is given below.

BetterModelClassDiagram

Storage component

StorageClassDiagram
Figure 2. Structure of the Storage Component

API : Storage.java

The Storage component,

  • can save UserPref objects in json format and read it back.

  • can save the Notebook data in json format and read it back.

Get grades feature

Implementation

The current GetStudentGradesCommand will retrieve all the grades of a particular student. This is done through iterating through the FilteredAssignmentList, and pulling all the grades of a specified student. Additionally, it implements the following operations through Commands:

  • Assignment#getGrades() — Retrieves the Map that contains students' names as the key and students' grades as the value.

The following sequence diagram shows how the get grades operation works:

GetGradesSequenceDiagram

After getting the Map from the getGrades() method, if the key of the current key-value pair is equals to the name of the student, the value, which is the grades of the student, will be added to the output that will be shown in the CommandResult.

Get unsubmitted assignments feature

Implementation

The implementation for getting unsubmitted assignments is similar to the get submitted feature, except that it will search for values of "Not submitted." instead.

The following activity diagram shows how the get unsubmitted operation works:

GetUnsubmittedActivityDiagram