PROJECT: Teacher’s Notebook


Overview

Teacher’s Notebook is an application for teachers to organise their classes and lessons as well as provide reminders when their lessons are about to start. 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.

Summary of contributions

  • Major enhancement: Added Lessons and Reminders to the app.

    • What it does: Allows user to add, delete, find or edit lessons. A reminder will be scheduled whenever a new Lesson is added.

    • Justification: Since lessons are an important part of a teacher’s daily work schedule, being able to add lessons and reminders will be useful for the teacher to keep track of what lessons they have.

    • Highlights: Reminders will be automatically added whenever a new Lesson is added and when the application is being closed and open, it will still be scheduled.

    • Credits: Command for Lessons are inspired by AddressBook3 commands for contacts.

  • Minor enhancement:

    • Added tabs to GUI to display lessons by the day of the week.

  • Code contributed: [tp code dashboard]

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

Lessons

The user can view his or her lessons on the left panel of the GUI of the Teacher’s Notebook.
There are several fields in each lesson as shown below:

  • LessonName - Prefix: l/

    • LessonNames should be alphanumerical, and cannot be empty.

  • StartTime - Prefix: st/

    • StartTime should be in the format dd/mm/yyyy hhmm e.g. 12/01/2020 1200

  • EndTime - Prefix: et/

    • EndTime should be in the format dd/mm/yyyy hhmm e.g. 12/01/2020 1300

  • repeat - Prefix: r/

  • Day - Prefix: day/

    • Day should be an integer between 1-7.

Adding: addlesson

Adds a lesson to the lesson list of the notebook.
Feature to repeat lessons will be implemented in v2.0
Format: addlesson l/LESSON st/START_TIME et/ET_TIME:dd/MM/yy HHmm

Examples:

  • addlesson l/Math 4E7 st/12/01/2020 1200 et/12/01/2020 1300

  • addlesson l/English 3E8 st/06/01/2020 1200 et/06/01/2020 1300

Once a lesson is added, a reminder will be automatically scheduled and an alert box will pop up when current time matches the time of the lesson.

Editing: editlesson

Edits a lesson at the specific index in the day list of reminder panel.
Day index represents day in week, e.g. Monday: 1, Tuesday: 2
Format: editlesson LESSON_INDEX day/DAY_INDEX [l/LESSON_NAME] [st/START_TIME] [et/END_TIME]

Examples:

  • editlesson 1 day/3 l/English 4E2

  • editlesson 2 day/4 st/05/01/2020 1200 et/05/01/2020 1300

The index and day index provided must be valid and at least one field must be edited.

Deleting: deletelesson

Deletes a lesson at the specified index in the day list of reminder panel.
Day index represents day in week, e.g. Monday: 1, Tuesday: 2
Format: deletelesson LESSON_INDEX day/DAY_INDEX

Examples:

  • deletelesson 1 day/2

  • deletelesson 3 day/4

The index and day index provided must be valid and at least one field must be edited.

Finding: findlesson

Finds lessons which match the given keyword.
Format: findlesson KEYWORD

Examples:

  • findlesson Math

  • findlesson 12:00

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.

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

Lesson Feature

Implementation

The Lesson class works with high similarity to the Student Class implemented. A UniqueList of Lessons exist in the Notebook alongside the UniqueList of Classrooms, and serve to keep track of lessons for the user. Additionally, it implements the following operations through Commands:

  • UniqueLessonList#addLesson() — Adds a new Lesson object to the UniqueLessonList.

  • UniqueLessonList#remove() — Removes a Lesson object from the UniqueLessonList.

  • Lesson#set() — Updates the Lesson with user input.

Scheduling Feature

Implementation

When a new Lesson is added to the UniqueLessonList, a listener attached to the list will be triggered and it will create a scheduler to schedule the lesson. Once the timing of lesson is reached, an alert box will be created in the GUI to serve as a reminder.

The following activity and sequence diagram shows how the scheduling operation works:

SchedulingActivityDiagram
SchedulingSequenceDiagram