• Component A: Program Code

My group's project focuses on tracking mood. It uses a variety of features such as a mood tracker, journal, and quote generator to allow the user to keep a log of their emotions. The feature that I mainly contributed to was the journal.

Component A: Program Code

CPT Requirements: Link to CPT Requirements
Requirement Description
(1) Input from user/device/online data stream/file:
  • A variety of features on our project require user input such as the journal page where users can enter text.
(2) Use at least one list (or other collection type) to represent a collection of data that is stored and used to manage program complexity and help fulfill the program’s purpose
  • Our quote repository makes use of local storage to retrieve quotes and display them.
  • Other pages of our project such as the login page make use of JSON which is a storage mechanism to keep track of the several variables that we use.
(3) At least one procedure that contributes to the program’s intended purpose, where you have defined the procedure’s name/the return type (if necessary)/one or more parameters
  • The journal page requires the use of many functions such as displayWordOfTheDay(), getRandomWord(), and saveEntry(). The getRandomWord() function has a return type of a string.
(4) An algorithm that includes sequencing, selection, and iteration that is in the body of the selected procedure
  • The saveEntry() function uses an if conditional to test if the user enter has entered text in the journal and parse this text. If the conditional evaluates to True, the provided text will be parsed and saved and the reflect button will also be created for users to access. If the conditional evaluates to False, an error message will be alerted on the screen.
(5) Calls to your student-developed procedure
  • The displayWordoftheDay() function is called whenever the page is reloaded.
(6) Instructions for output (tactile, audible, visual, or textual) based on input and program functionality
  • After the journal entry is completed by the user and they click the submit button, an alert will appear on the screen that says the writing has succesfully been saved.