PROJECT: LearnVocabulary


Overview

LearnVocabulary is a desktop application for people who prefer to use an offline version of the dictionary for learning purposes.

Summary of contributions

  • Major enhancement: Added the word of the day feature (command)

    • What it does: Looks up the current word of the day on website Dictionary.com. It fetches the word, extracts its meaning and displays it for the user to learn.

    • Justification: The features saves time when a user cannot think of a word to learn, or just otherwise would like to learn a new random word that is usually very special or rare.

    • Highlights: The feature had to be integrated by looking at several existing commands in detail as well extending code freshly written by another team member (russellong95).

    • Some PRs for the feature: #91, #93, #154

  • Minor enhancement: Deleted/refactored fields Email, Phone and Address from AB4. Fields were used extensively throughout the application and required careful but major changes of the existing code to not break the whole application. (Pull requests: #50 and #23)

  • Minor enhancement: Added different coloring of tags. However, feature was later removed due to a fresh restart of the project. After that I considered the feature to be only "nice to have" and did not reimplement it. PR: #10

  • Code contributed: RepoSense collated code

  • Other contributions:

    • Project management:

      • In charge of documentation.

      • Co-managed Netlify, styling.

    • Enhancements:

      • General bug fixes and reviews.

    • Documentation:

      • For example formatting of Developer Guide and User guide to make Netlify render the website correctly (Pull requests: #76 and #77)

    • Community:

      • Reported bugs and suggestions for other teams in class (Examples: 1, 2, 3, 4, 5)

      • General team bug fixes. For example PR #73

      • Added documentation for features implemented.

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.

Word of the day : word

Displays the current word of the day and its meaning from Dictionary.com. (Requires a working internet connection). Format: word

This function does only display the word and its meaning. If you want to learn the word. Please use the LearnCommand feature: Format: learn [word]

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.

WordOfTheDay feature

Current Implementation

The Word Of The Day command is indicated as WordOfTheDay in commands, and inherits the Command class. It enables the user to display the current word of the day taken from website Dictionary.com. Similarly to the "learn" command, this command also requires a working internet connection. It is impossible to make this feature available offline since the word of the day cannot be predicted on Dictionary.com

The Word Of The Day command utilizes the same functions in the Dictionary class made for the 'LearnCommand', but also adds the following functions:

  • Dictionary#doesWordOfTheDayExist() — Checks to see if the word of the day exist on Dictionary.com and returns the word of the day page as a Document object.

  • Dictionary#fetchWordOfTheDay() — Parses the word of the day and its meaning from the Document object returned by doesWordOfTheDayExist() and returns itself (Dictionary object).

Dictionary#fetchWordOfTheDay() is used in the WordOfTheDayParser class as WordOfTheDayParser#parse(), while all the other executions are self-contained within the Dictionary#fetchWordOfTheDay() function.

Below is a description on how the Word Of The Day function operates:

Step 1: User cannot think of a word so he/she wants to display the word of the day on Dictionary.com.

Step 2: User would make sure that there is a working internet connection.

Step 3: User would type "word" into the command line.

Step 4: The word of the day will be parsed by WordOfTheDayParser, calling WordOfTheDayParser#parse() The WordOfTheDayParser exists solely for the purpose of utilizing the existing functions made for parsing the online Dictionary and putting the word into a Word object.

Step 5: This calls the Dictionary class and all relevant functions. The first one being Dictionary#fetchWordOfTheDay().

Step 6: The Word Of The Day will be fetched online from Dictionary.com and displayed by the WordOfTheDayCommand together with its meaning. Should the internet-connection fail, the operation throws a MESSAGE_NO_INTERNET.

The Word Of The Day is displayed together with a "WordOfTheDay" tag. The word and the tag are not stored in any group somewhere, but is only displayed for the user. If the user wants to learn the word, he or she shall use the LearnCommand.

The following sequence diagram shows how the Word Of The Day command works:

WordOfTheDaySequentialDiagram

Use case: Show Word Of The Day - Todays random, special word from Dictionary.com

MSS

  1. User inputs command (word).

  2. The word of the day will be queried online.

  3. The word and its meaning will be displayed.

  4. User can choose to learn the word by using the learn command

    Use case ends.