You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sub-Task 1: Add a screenshot from the db of the system user (Users table)
Caption:
the first row shows the system user
Caption:
the picture shows the id value to be negative
Sub-Task 2: Add a screenshot from the db of the world account (Accounts table)
Caption:
world account
Caption:
negative value
Sub-Task 3: Explain the purpose and usage of these two entries and how they relate
Response:
the purpose of the world account is simple, like in real life, when we deposit money into a bank, the bank's account is filled with our money and that is how banks are able to give out loans to others (often at very very high interest rates) its like a pool of money that the bank holds for its functioning. And when we withdraw money, the bank takes money out of its pool and hands it to the customer. The negative id value is very important as to make it not clash with any other id value that the customer may register. -1 acts as a safe measure because the database will only accept positive id values.
Sub-Task 1: Add a screenshot showing the requested links/navigation
Caption:
picture of the dashboard page
Sub-Task 2: Explain which ones are working for this milestone
Response:
All the links are working as per the requirements of this milestone and I am really proud of the project that came out at the end. The various links takes the user to various pages such as transaction where the user will be able to view their transactions, withdrawl/deposit where the user can make transactions, the account page takes the user to the account page where the user will be able to view and list all their accounts. And finally, the create account page which will let the use open up a new account, also the user id of the user is prefilled to ensure proper account creating using the sql functions.
Sub-Task 1: Add a screenshot showing the Create Account Page
Caption:
form prefilled with the logged in user id
Sub-Task 2: Add screenshots showing validation errors and success message
Caption:
minimum funding validation
Caption:
successful account creation
Sub-Task 3: Add a screenshot showing the transaction generated from the initial deposit (from the DB)
Caption:
initial transaction
Sub-Task 4: Explain which account number generation you used and the account creation process including the transaction logic
Response:
I used a random account number generation technique to get a unique 12 digit account number when ever the user wants to create a new account. The approach was simple, have a list of digits and letters and then make a function that takes in this list and randomizes it to generate the account number. then it verifies that number generated with the database to check if an account with the same number exists or not, if it does, it throws an exception and shows an error, if not then normal procedure follows. When the user selects 'create account' from the dashboard page, it takes the user to the create account page where the user id is already prefilled for functionality, then the program assigns a random account number to the user where it is also displayed to the list at the bottom of the page. It also shows the user the number of the account they are creating, for ex - if the use is creating their fifth account, then the page displays a note saying the same.
Deliverable 4: User will be able to list their accounts
Status:
Sub-Task 1: Add a screenshot showing the user's account list view (show 5 accounts)
Caption:
account details
Caption:
5 accounts created
Sub-Task 2: Briefly explain how the page is displayed and the data lookup occurs
Response:
When the user selects an account, the sql query takes in the account number and also the user id from the logged in session to retrieve that particular account from the database and then uses php function to display that to the webpage. I cleverly used the user id from the session data to reference the accounts table and then grabbed the useful data.
Sub-Task 1: Add a screenshot of an account's transaction history
Caption:
few samples
Caption:
shows account number and details
Caption:
shows destination to and from world
Sub-Task 2: Explain how the lookup and display occurs
Response:
Just like the account display, I used the user id from the session to reference that from the account table. The account table uses the user id as a foreign key, and then i used a simple sql query to sort thru the data in the transaction table and then used php to display that data in the webpage. Since i already took cs331 at NJIT, i created a schema diagram to make the job easier to visualize and then, the coding part took only 10 minutes.
Sub-Task 2: Show a Screenshot of the Withdraw Page (this potentially can be the same page with different views)
Caption:
withdraw process
Sub-Task 3: Show validation error for negative numbers
Caption:
negative number validation
Sub-Task 4: Show validation error for withdrawing more than the account contains
Caption:
cannot withdraw more than the account balance
Sub-Task 5: Show a success message for deposit and withdraw (2 screenshots)
Caption:
deposit success
Caption:
withdraw success
Sub-Task 6: Show a screenshot of the transaction pairs in the DB for the above tests
Caption:
database of the transactions, the last transaction pair shows the latest transaction made in the task above
Sub-Task 7: Briefly explain how transactions work
Response:
The deposit and withdraw page was created using html as a skeleton, css for the design and the php for the functionality. The page has a list of account that the user can select from a dropdown page and then the user can decide what to do. Now the user has to select an account before performing any function because the sql query depends on the user providing accurate info and to ensure this, i make the account selection process mandatory without which the code will not let the user proceed. Then if the user wants to withdraw more than the account balance, i made sure that a different sql query runs first that references the account table with the user id to ensure sufficient funds. If funds are there, then the use can withdraw the amount, if not then i used an error message that will let the user know that the account does not have enough funds. Additionally, i used the user id from the session data to reference the account table when a transaction occurs, if a deposit is made, the funds are added to the use account as well as the world account, and if a withdraw occurs, the funds are subtracted from the users account as well as the world account and then displays a message that a withdraw has occurred. The sql database shows the pair account from which the transactions has occurred.