Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I NEED HELP! ! ! ! ! INCUDE SCREENSHOT for each questions. Follow along with the lecture content ( slides / video ) which refer

I NEED HELP! !!!! INCUDE SCREENSHOT for each questions.
Follow along with the lecture content (slides/video) which refer to "Homework Assignment" as your guide and starting point.In this week's files you are given "bank_index.ejs" and "accounts_summary.ejs" for you to use. "accounts_summary.ejs" is similar to the example used within the class video. It should receive an object "accounts" which is an array of objects, each having an accountId, name, and balance. (This should match the fields from your BankDB database). Thus, this should be the page that is used to render the current balance of all known accounts. The "bank_index.ejs" file should be rendered as the "home/landing" page when you first connect to your webapp via the browser. It has two parts. The first is a form with a button to display all balances. It does a POST to the /accounts_summary endpoint which should be connected to the "accounts_summary.ejs" page we just described. It then has a second form with a few fields {accountIdA, accountIdB, amount} its purpose is to allow the user to 'transfer' money from one account to another. This will POST to the /transfer endpoint.
Points for this assignment are awarded by completing the following criteria:
1) Create a bank.js application that starts a webserver and waits for requests.
2) Your webserver should display/render "bank_index.ejs" at the "/" endpoint.
3) When the user clicks 'Show Balances' it should properly POST to /accounts_summary and render "accounts_summary.ejs"
4) The /accounts_summary request should properly connect to your database such that the page from the last step accurately displays the data from the BankDB database.
5) When the user clicks 'Transfer' it should properly POST to /transfer and render some result page that tells the user the request is complete. (A static page/text is sufficient and no additional database logic is necessary for this part).
For Part 6, be sure to have gone over "Parsing Parameters" and "Callbacks"
6) Add the appropriate logic to perform the transfer of funds within the BankDB records.
6a) The funds should be correctly removed from accountIdA
6b) The funds should be correctly added to accountIdB
6c) Verify that both accounts do indeed exist before performing the transfer
6d) Verify that accountIDA has sufficient funds before performing the transfer

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago