PROJECT: TeaPet


Overview

TeaPet is a personal manager application for form teachers of primary, secondary and tertiary institutions. The user interacts with it via a Command Line Interface (CLI) along with a Graphical User Interface (GUI) created with JavaFX. The application is written in Java.

Summary of contributions

  • Major enhancement: developed the notes feature of Teapet

    • What it does: Allows the user to create notes of his/her students spontaneously, functioning as a digitaal "Post-It".

    • Justification: This feature is crucial in a teacher’s daily workflow. There might be instances throughout the day where the user wishes to jot down important information of his/her student, such as the student leaving school early due to commitments. The teacher can also note down behavioural information whenever neccessary, to prepare for parent-teacher meeting and year-end student reviews. The notes feature will manage all student information all within a few simple commands.

    • Highlights: This enhancement features different priority of notes (Low, Medium and High), each displayed with a different colour. Users are able to create, edit, delete, filter and export notes in TeaPet.

  • Major enhancement: developed the UI/UX (User Interface / User Experience) of Teapet

    • What it does: Provides an optimal and pleasant interaction between User and TeaPet.

    • Justification: In every product, a well-developed UI/UX is key to getting a User interested in using the application for a sustained period of time. TeaPet aims to create an attractive display and pleasant experience for all our Users.

    • Highlights: This enhancement saw a makeover of the original AddressBook3 interface. Colours of each component in the application is carefully chosen to create a good blend. The tabs at the top of the applications also lights up when a particular feature is in use, such that the user is clear on which feature he/she is on.

  • Minor enhancement:

    • Created a student detailed command, which displays all information of every student in the Main Display, including personal and administrative. It serves as a toggle between default and detailed display of the student list.

  • Code contributed: [Functional and Test code]

  • Other contributions:

    • Project management:

      • Managed all releases of the team v1.1 - v1.4 (5 releases) on GitHub

      • Managed all milestones (inclusive of unofficial team milestones) of the team on GitHub.

      • Consistently reminded the team to complete their tasks assigned by the deadline provided.

      • Structured the project folders in the repository for the team, to enable a clean and effective workflow.

    • Enhancements to existing features:

      • Updated the GUI color scheme (Pull requests #202)

      • Updated the GUI layout (Pull requests #201 #204 #208 #209 #210)

      • Did cosmetic tweaks to existing contents of the User Guide: (Pull requests #226 #230)

    • Documentation:

      • Updated User Guide to include Notes Feature (Pull requests: #226)

      • Updated User Guide with the Installation details of TeaPet, as well as help on how to navigate the User Interface. (Pull requests: #241)

      • Updated Developer Guide to include Notes Feature (Pull requests: #247 #268)

      • Updated Developer Guide to include revamped architecture component diagrams. (Pull requests: #267)

    • Community:

      • PRs reviewed (with non-trivial review comments): (Pull requests: #66, #95)

      • Reported bugs and suggestions for other teams in the class (examples: Practical Exam Dry Run)

    • Tools:

      • Introduced iCalendar API to the team, which was then used to build TeaPet’s Personal Scheduler feature.

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.

Quick Start [Done By Gerren Seow]

This section will serve to explain the various components of the TeaPet, which you can interact with. You can also follow our step-by-step guide on how to install the application into your Computer. Quickly now, let’s get started!

TeaPet’s Layout

TeaPet’s User Interface can be divided into 5 main components, each performing a specific functionality.

TeaPetLayout
Figure 1. User Interface of TeaPet
  1. Feature Tabs
    These tabs display some of TeaPet features so that you tell easily which section of TeaPet you are in. There is a drop-down menu in each tab to select and perform various feature functionality, if you intend to use your mouse instead of the command line to access the features.

  2. Main Panel
    The main panel is the display window of Student List, Student Administration, Student Academics and Personal Schedule information. Depending on which feature you are currently using, the main panel will display corresponding information.

  3. Notes Panel
    The notes panel is specifically used to displays all the notes stored in TeaPet.

  4. Command Box
    The command box is where you will be entering commands into TeaPet.

  5. Result Display Box
    The result display box is where TeaPet’s server replies to every command input. Any success, error or information messages will be displayed in this box.

Installation

The details below indicate the step-by-step process on getting started with TeaPet.

  1. The Computer you are using should either be of Windows or Mac operating system.

  2. Ensure you have Java 11 or above installed in your Computer.

  3. Download the latest TeaPet.jar here.

  4. Copy the TeaPet.jar file to the folder you want to use as the root directory for TeaPet.

  5. Double-click the file to start the app. The Graphical User Interface (GUI) should appear in a matter of seconds.

    Ui
    Figure 2. Home View of TeaPet
  6. Type the command in the command box and press Enter to execute it.
    For example, typing help and pressing Enter will open the help window.

  7. Some example commands you can try:

    • student add name/Kelvin Klein : adds a contact named Kelvin Klein to the class List

    • student delete 3 : deletes the 3rd student shown in the current list of students

    • exit : exits the app

  8. Refer to [Features] for details of each command.

If you have any questions, please check out our [FAQ] section.

Notes [Done by Gerren Seow]

TeaPet’s Notes feature performs like the ones we all use in our everyday lives, aiming to help form teachers keep track of important information of their students spontaneously. This feature allows you to label each note with different priority to better manage tasks. Every note is specifically tagged to a student, such you will be able to better keep track of the stakeholder and information.

Display all Notes and Help notes

Shows all notes currently stored in TeaPet, and displays help on the usage of this feature.

Format:

notes

Expected Outcome:

The Column on the right displays all your notes.
[HELP ON NOTES COMMANDS]
1. Display all Notes: notes
2. Add Note: notes add name/STUDENT_NAME cont/CONTENT pr/PRIORITY
3. Edit Note: notes edit INDEX [name/UPDATED_STUDENT_NAME] [cont/UPDATED_CONTENT] [pr/UPDATED_PRIORITY]
4. Delete Note: notes delete INDEX
5. Filter Search Notes: notes filter KEYWORD(S)
6. Export Notes: notes export
notesDisplay
Figure 3. After using the notes command

Add Notes notes add

Adds a note into TeaPet.

Format:

notes add name/STUDENT_NAME cont/CONTENT pr/PRIORITY
  • Create and add a new note with the following fields.

  • An automatic timestamp is generated for each note added.

None of the fields can be empty. Priority must either be LOW, MEDIUM or HIGH.
Student’s name (case-sensitive) indicated in the name field must be already present in the class-list. Please refer to Section 4.1.3, "Add Student" should you need help on adding a student.

Example:

  • notes add name/Freddy Zhang cont/Reminder to inform his parents about Freddy’s exemplary behaviour. pr/LOW
    Adds a note for student "Freddy Zhang" into the list of notes, together with content and priority.

Expected Outcome:

New Student Note added! Wonderful!
[NOTE]
Student: Freddy Zhang
Content: Reminder to inform his parents about Freddy’s exemplary behaviour.
Priority: LOW
notesAdd
Figure 4. After using the notes add command

Edit Notes notes edit

Edits a note in TeaPet.

Format:

notes edit INDEX [name/UPDATED_STUDENT_NAME] [cont/UPDATED_CONTENT] [pr/UPDATED_PRIORITY]
  • Edits a current note in the list by index. Index chosen must be an integer within the total number of notes.

At least 1 of the three prefix fields must be indicated. Priority must either be LOW, MEDIUM or HIGH.
Updated student’s name (case-sensitive) indicated in the name field must be already present in the class-list. Please refer to Section 4.1.3, "Add Student" should you need help on adding a student.

Example:

  • notes edit 4 cont/Reminder to inform his parents about Freddy’s exemplary behaviour TONIGHT. pr/HIGH
    Edits a note for student "Freddy Zhang" in the list of notes, together with updated content and updated priority.

Expected Outcome:

Student's Note Edited. Wonderful!
[NOTE]
Student: Freddy Zhang
Content: Reminder to inform his parents about Freddy’s exemplary behaviour TONIGHT.
Priority: HIGH
notesEdit
Figure 5. After using the notes edit command

Delete Notes notes delete

Deletes a note in TeaPet.

Format:

notes delete INDEX
  • Deletes a current note in the list by index. Index must be an integer within the total number of notes.

Example:

  • notes delete 4
    Deletes the 4th note in the list. In this example, the note is the one we created for student "Freddy Zhang".

Expected Outcome:

Student Note deleted.
[NOTE]
Student: Freddy Zhang
Content: Reminder to inform his parents about Freddy’s exemplary behaviour TONIGHT.
Priority: HIGH

Filter Notes notes filter

Displays a list of filtered notes based on specific keywords.

Format:

notes filter KEYWORD(S)
  • Filters the list of notes based on the presence of keywords given.

  • This notes filter feature will perform a comparison of name of student, content, priority and timestamp of the notes.

  • Filtering is done based on character match, not full-word match.

Example 1:

  • notes filter low
    Displays only notes with the keyword "low" present.

Expected Outcome:

Displaying Notes with Keywords: [low]
notesFilter
Figure 6. After using the notes filter low command

Example 2:

  • notes filter high 29
    Displays only notes with the keyword "high" and "29" present.

Expected Outcome:

Displaying Notes with Keywords: [high, 29]

Export Notes notes export

Exports all notes in TeaPet into a .csv file.

Format:

notes export
  • Exports all notes into studentNotes.csv, which can be located in the data folder of the same directory as the TeaPet application.

  • The .csv file’s column headers are Student, Priority, DateTime and Content, in that order.

Example:

  • notes export

Expected Outcome:

Notes are exported to studentNotes.csv in the data folder

Notes Commands

Here are the commands to manage notes. They require the prefix notes.

Table 1. Notes commands of TeaPet

Command

Format

Expected outcome

notes add

notes add name/STUDENT_NAME cont/CONTENT pr/PRIORITY

Adds a note into TeaPet

notes edit

notes edit INDEX [name/UPDATED_STUDENT_NAME] [cont/UPDATED_CONTENT] [pr/UPDATED_PRIORITY]

Edits a note in TeaPet.

notes delete

notes delete INDEX

Deletes a note in TeaPet.

notes filter

notes filter KEYWORD(S)

Displays a list of filtered notes based on presence of keywords.

notes export

notes export

Exports all notes in TeaPet into a .csv file

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

This section describes the high-level software structure of TeaPet’s Model Component.

ModelClassDiagram
Figure 7. Structure of the Model Component with Student class as a detailed example.

API : Model.java

The Model,

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

  • stores the data of different Entities.

  • stores in-memory data of Students, Admin, Academics, Notes and Events.

  • exposes multiple unmodifiable ObservableLists that can be 'observed' e.g. the UI can be bound to these lists so that the UI automatically updates when the data in the lists change.

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

Storage component

This section describes the high-level software structure of TeaPet’s Storage Component.

StorageClassDiagram
Figure 8. Structure of the Storage Component

API : Storage.java

The Storage component,

  • converts Model objects into savable data in JSON-format and vice versa.

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

  • can store Students, Admin, Academics, Notes and Events in a several json files, which can be read.

Common classes

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

Notes feature

TeaPet application comes with an in-built notes feature, which serves to allow Teachers to record administrative or behavioural information of his/her students. Each note is tagged to a specific student and acts as a lightweight, digital 'Post It'.

The notes feature comprises of 6 main functionalities represented by 6 commands. They are namely:

  • NotesCommand - Displays all notes and help on the notes feature.

  • NotesAddCommand - Adds a new note into TeaPet.

  • NotesEditCommand - Edits the details of a note in TeaPet.

  • NotesDeleteCommand - Deletes a note in TeaPet.

  • NotesFilterCommand - Filters the list of notes in TeaPet based on user-input keywords.

  • NotesExportCommand - Exports all notes information into a .csv file

NotesClassDiagram
Figure 9. Class Diagram for Notes Commands

Structure of Notes Class

Notes object is made up of 4 fields. They are namely: Student Name, Content, Priority and DateTime. The class diagram below depicts the structure of the Notes in the Model Component. Please refer to Model component for the higher-level architecture.

NotesModelClassDiagram
Figure 10. Class Diagram for Notes Model Component

Add Note

The following is a detailed elaboration of how NotesAddCommand operates.

Format for adding a Note is notes add name/STUDENT_NAME cont/CONTENT pr/PRIORITY.
Priority can only be either LOW, MEDIUM or HIGH, case-insensitive. Student must be present in the class list for him/her to be tagged in a note.

Step 1. The NotesAddCommand#execute(Model model) method is executed which takes in a necessary student name, content and priority as input.

Step 2. The note is then searched through the UniqueStudentList#students list using the Model#hasStudentName(String student) method to check if the specified student exists. If the student does not exist, the CommandException will be thrown with the invalid student error message.

Step 3. The note is then searched through the UniqueNotesList#notes list using the Model#hasNote(Notes note) method to check if the note already exists. If the note exists, the CommandException will be thrown with the duplicate note error message.

Step 4. The method Model#addNote(Notes note) will then be called to add the note. The command box will be reflected with the NotesAddCommand#MESSAGE_SUCCESS constant and a new CommandResult will be returned with the message.

If the format or wording of NotesAddCommand contains error(s), the behaviour of NotesManager will be similar to step 2 and 3, where either a unknown command or wrong format error message will be displayed.
NotesAddSequence
Figure 11. Sequence Diagram for Adding Notes
SDGetNotesAddCommand
Figure 12. Reference Frame for Sequence Diagram

Edit Note

The following is a detailed explanation of the operations which NotesEditCommand performs.

Format for adding a Note is notes edit INDEX [name/UPDATED_STUDENT_NAME] [cont/CONTENT] [pr/PRIORITY].
Priority can only be either LOW, MEDIUM or HIGH, case-insensitive. Enclosing [] braces indicate optional fields. At least one of the three fields must be present.
Updated student must be present in the class list for him/her to be tagged in a note.

Step 1. The NotesEditCommand#execute(Model model) method is executed which edit attributes of the selected note. The method checks if the index defined when instantiating NotesEditCommand(Index index, EditNotesDecriptor editNotesDescriptor) is valid. Since it is optional for users to input fields, the fields not entered will reuse the existing values that are currently stored and defined in the Notes object.

Step 2. The note is then searched through the UniqueStudentList#students list using the Model#hasStudentName(String student) method to check if the specified student exists. If the student does not exist, the CommandException will be thrown with the invalid student error message.

Step 3. A new Notes with the updated values is created and it is then searched through the UniqueNotesList#notes list using the Model#hasNote(Notes note) method to check if the note already exists. If the note exists, the CommandException will be thrown with the duplicate note error message.

Step 4. The newly created Notes will replace the old one through the Model#setNote(Notes toBeChanged, Notes editedNote method.

Step 5. The command box will be reflected with the NotesEditCommand#MESSAGE_SUCCESS constant and a new CommandResult will be returned with the message.

Delete Note

The following is a detailed explanation of the operations which NotesDeleteCommand performs.

  1. After the successful parsing of user input, the NotesDeleteCommand#execute(Model model) method is called which checks if the index is defined as an argument when instantiating the NotesDeleteCommand(Index index) constructor.

    The Index must be within the bounds of the list of notes.
  2. The Notes at the specified Index is then removed from the UniqueNotesList#notes observable list using the Model#deleteNote(Index index) method.

  3. The command box will be reflected with the NotesDeleteCommand#MESSAGE_SUCCESS constant and a new CommandResult will be returned with the success message.

NotesDeleteActivityDiagram
Figure 13. Activity Diagram for Deleting Note

Filter Notes

The following is a detailed explanation of the operations which NotesFilterCommand performs.

  1. After the successful parsing of user input, the NotesFilterCommand#execute(Model model) method is called which checks if the NotesContainsKeywordsPredicate(keywords) is defined as part of the argument when instantiating the NotesFilterCommand(NotesContainsKeywordsPredicate predicate) constructor.

  2. The Notes objects are then searched through the UniqueNotesList#notes list, checking for presence of any keyword given by the user.

  3. The existing UniqueNotesList#internalList is then cleared and updated using the Model#updateFilteredNotesList(Predicate predicate) method.

  4. A new CommandResult will be returned with the success message.

Export Notes

The following is a detailed explanation of the operations which NotesExportCommand performs.

  1. After the successful parsing of user input, the NotesExportCommand#execute(Model model) method is called.

  2. The command box will be reflected with the NotesExportCommand#MESSAGE_SUCCESS constant and a new CommandResult will be returned with the success message.

  3. The MainWindow of the UI component will process the CommandResult and create a studentNotes.csv in the data folder of the current directory.

Design Considerations
  • Current Implementation: Intuitive, simple syntax and user-friendly

    • Pros: It is easy for the Teacher to use the feature.

    • Cons: Not as powerful and less utility for advanced users.

  • Alternatives Considered: Many additional fields including special tags, reminders, etc.

    • Pros: Powerful, many interesting features that advanced users can use.

    • Cons: It contradicts with the initial goal of the Notes feature which is to enable quick and easy note-taking.


Use case: UC15 - Add note for specific student

MSS

  1. User enters command, together with a student name, note’s content and priority level.

  2. TeaPet displays feedback that a new note is now tagged to the student specified.

  3. TeaPet’s note panel will display the updated list of notes.

    Use case ends.

Extensions

  • 1a. Command is invalid.

    • 1a1. TeaPet shows an error message.

  • 1b. Student is invalid.

    • 1b1. TeaPet shows an error message.

      Use case ends.

Use case: UC16 - Edit note of specific student

MSS

  1. User enters command, together with an index of the note to edit, and fields to update.

  2. TeaPet displays feedback that the specific note chosen has been edited.

  3. TeaPet’s note panel will display the updated list of notes.

    Use case ends.

Extensions

  • 1a. Command is invalid.

    • 1a1. TeaPet shows an error message.

  • 1b. Student is invalid.

    • 1b1. TeaPet shows an error message.

  • 1c. Index is invalid.

    • 1c1. TeaPet shows an error message.

      Use case ends.

Use case: UC17 - Delete note for specific student

MSS

  1. User enters command, together with an index of the note to delete.

  2. TeaPet displays feedback that the specifed note is deleted.

  3. TeaPet’s note panel will display the updated list of notes.

    Use case ends.

Extensions

  • 1a. Command is invalid.

    • 1a1. TeaPet shows an error message.

  • 1b. Index is invalid.

    • 1b1. TeaPet shows an error message.

      Use case ends.

Manual Test: Notes

In order to add or edit a specific note belonging to a student, the student must first be in the class-list. In order for optimal manual testing, please create the student first before creating a note which belongs to him/her. You can refer to [Feature-Add] to find out more on how to add a student to the class-list.
Delete all previous notes. Be sure two students named Freddy Zhang and Lee Hui Ting are in the class-list. Conduct these tests sequentially from first to last, for the most effective testing experience.
  1. Adding a note to the notes panel.

    1. Test case: notes add name/Freddy Zhang cont/Reminder to print his testimonial pr/HIGH
      Expected: New note added to the notes panel. This note should be red (high priority) in colour, belonging to Freddy Zhang. The timestamp in the note should be the current date and time.

    2. Test case: notes add name/Freddy Zhang cont/Freddy was late for class for the second day in a row. pr/LOW
      Expected: New note added to the notes panel. This note should be yellow (low priority) in colour, belonging to Freddy Zhang. The timestamp in the note should be the current date and time.

    3. Test case: notes add name/Lee Hui Ting cont/Hui Ting left school for an interview. pr/MEDIUM
      Expected: New note added to the notes panel. This note should be orange (medium priority) in colour, belonging to Lee Hui Ting. The timestamp in the note should be the current date and time.

    4. Test case: notes add name/Freddy_Zhang_ cont/He exemplified an improvement in behaviour pr/LOW
      Expected: An error message is shown as the student name should be alpha-numeric.

    5. Test case: notes add name/Freddy Zhang cont/He exemplified an improvement in behaviour pr/Not High
      Expected: An error message is shown as priority indicated must be either LOW, MEDIUM or HIGH, case-insensitive.

  2. Editing a note in the notes panel.

    1. Test case: notes edit 1 cont/Reminder to print his testimonial and gradebook
      Expected: First note in the panel is updated with new content. Only the content should be modified, and nothing else.

    2. Test case: notes edit 1 name/Lee Hui Ting cont/Reminder to print her testimonial and gradebook
      Expected: First note in the panel is updated with new name and content. Note should reflect student Lee Hui Ting’s name, with modfied content. Nothing else should be different.

    3. Test case: notes edit 1 pr/MEDIUM
      Expected: First note in the panel is updated new priority. Note colour should change from red to orange.

  3. Deleting a note in the notes panel.

    1. Test case: notes delete 1
      Expected: First note in the panel should be removed.

    2. Test case: notes delete 0
      Expected: An error message is shown as the integer provided must be greater than zero.

    3. Test case: notes delete 4
      Expected: An error message is shown as the integer provided as the number of notes in the notes panel is less than 4. Integer provided is out of range.

  4. Filtering the list of notes to search for specific notes.

    1. Test case: notes filter Freddy
      Expected: Only notes containing the word Freddy should be displayed in the notes panel.

    2. Test case: notes filter low
      Expected: Only notes containing the word low should be displayed in the notes panel.

  5. Exporting notes in the notes panel into a .csv file.

    1. Test case: notes export
      Expected: A file named studentNotes.csv should be created in the data folder of the same directory in which TeaPet is installed.

    2. Test case: notes export 3
      Expected: An error message is shown as there should be no arguments passed into notes export command.