5.1 Three Design Ideas
Mock-ups
Design 1


Design 2


Design 3


Data dictionary
| Name |
Data Type |
Format |
Max length |
Required? |
Validation |
Description |
Sample |
| Email |
String |
[email protected] |
100 |
Y |
- Format validation |
|
|
- Domain validation
- Does not already exist | | [email protected] |
| Password | String | | 50 | Y | - Mixed character validation (password strength) | | mI4$i#xDFpoI9 |
| Textbook ID | String | [Char][Char][Int][Int][Int] | 5 | Y | | | SD094 |
| User ID | Int | | 1 | Y | - Does not already exist | | 6 |
| Textbook metadata | JSON or XML | | 10000 | Y | - Required data fields exist | | (See input file designs in 5.5) |
| Textbook title | String | | 100 | Y | | | Applied Computing: Software Development Units 3 & 4 |
| Contributor | String | [First name] [Surname] | 250 | N | - Format validation | | Amber Whyte |
Pseudocode
Build textbook
PROCESS Build textbook
metadata <- READ data from "config.json"
OPEN FILE "textbook.html"
FOREACH page
FOREACH markdown element in page
# convert to HTML element
WRITE HTML element to file
Handle question response
PROCESS Handle response
question <- "This is a question. What is your answer?"
correct_answers <- ["This is my answer", "This is not my answer"]
DISPLAY question
response <- INPUT response
IF response is in correct_answers
DISPLAY "Correct"
ELSE
DISPLAY "Incorrect"
Log in
PROCESS Log in
email <- INPUT email
password <- INPUT password
READ user emails from database
IF email IN user emails:
READ users from database
IF password = users[email].password
# issue JWT
ELSE
DISPLAY "Incorrect password"
ELSE
DISPLAY "Incorrect email"