College Board Create Performance Task for FLOW
Program Purpose
The purpose of this feature is for the users of the FLOW website to be able to customize their usage of the website. Users of the website can input their username and password to login to the account. The feature is able to function through the inputs (password and username) and connecting it to a backend API so that user data can be saved.
Data Abstraction
The data in this feature will be stored in a dictionary. An example dictionary that would be stored in the api is …
{"name": "Grace Wang", "uid": "gracew", "dob": "09-02-2005", "age": 17, "password": "gw1234567890"}
Every time user info is imported, it would be set to a variable, such as u1 and using the OOP code for creating users, it would be updated in the API.
Managing Complexity
Using a dictionary would manage the complexity of the program because their are many variables. Using a dictionary is especially useful because we can set key/value pairs. If we were not to use dictionaries, we would have to set each input as a seperate variable, such as..
name1 = "Grace Wang"
uid1 = "gracew"
dob = "09-02-2005"
age = "17"
password = "gw1234567890"
Using dictionaries shortens the code significantly.
Procedural Abstraction
Using the class we created for signins, we have the inputs of name, uid, date of birth and password into the User function
u2 = User(name="Grace Wang", uid="gracew", password="gw1234567890", dob=date(2005,9,2))
Algorithm Implementation
Sequencing, selection, and iteration will be used in this feature. Sequencing is used in the calculation of age algorithm. When the user inputs their date of birth, the algorithm will calculate their age and store it in the API. Selection will be included as when the user inputs their username and password, if they the username and password is in the API, they will be allowed into their account, however, if they input wrong, they will be prompted to input again or make a new account. Iteration occurs when the algorithm repeatedly accepts new accounts through user inputs.
Testing
This algorithm can be tested by the user inputting their username and password for an existing account logging in. Then the user can type in the wrong username and password and they will not be allowed to continue to their account
Video Plan
- Navigate to Signin Page
- Input correct username and password
- Continue to user account
- Reset signin page
- Login with wrong user name and password
- Page will prompt to try to login again or to make an account