OPTION 1- Banking App In this exercise you will build a simple banking system according the design shown in Figure 1. aunts Bemkcourt Bocumtio:mumber ccountacurtio:umber Eaniccount boance nunber calstaAccoumaccourtio: numcar desectamount numbar fa unt wihanet unt smEc mumber setale:sting deseriaccountsasen:sng:Baniecoun SavingAccount CumentAccount nittyl mnt cetuteserembenetPercentnge numbe dedudFee) Figure 1. Banking System Class Diagram 1) Create BankAcount class with the following properties: accountNo, balance. This dass should have a constructor to initialize these 2 properties. This class should have these methods: - deposit(amount): this method adds the amount to the balance withdraw(amount): this method subtracts the amount from the balance tostring): this method return Account # accountNo has QR balance. eg, Account #123 has QR1000. Export the BankAccount class module as an object. 2) Create app.js program. Declare accounts variable array and initialize it with the following ассou accounts: accountNo balance 123 1000 234 4000 345 3500 Display the content of the accounts array. 3) Create SavingRAccount class that extends BankAccount with an extra property: minBalance and an extra method distributeBenefitlbenefitPercentage). This method computes the monthly benefit using the balance += (balance * benefitPercentage). The constructor should extend BankAccount to initialize the minBalance. Also, extend the tostrine) to indicate that this is a Saving Account. eg, eg, Saving Account #123 has QR1000. Test savingAccount in app.js using the same table above and use a minimum balance of 500 for all accounts. 4) Create CurrentAccount class that extends BankAccount with an extra property: monthlyfee and an extra method deductfee). This method subtracts the monthlyfee from the account balance only if the deducted fee is less than the balance. The constructor should extend
OPTION 1- Banking App In this exercise you will build a simple banking system according the design shown in Figure 1. aunts Bemkcourt Bocumtio:mumber ccountacurtio:umber Eaniccount boance nunber calstaAccoumaccourtio: numcar desectamount numbar fa unt wihanet unt smEc mumber setale:sting deseriaccountsasen:sng:Baniecoun SavingAccount CumentAccount nittyl mnt cetuteserembenetPercentnge numbe dedudFee) Figure 1. Banking System Class Diagram 1) Create BankAcount class with the following properties: accountNo, balance. This dass should have a constructor to initialize these 2 properties. This class should have these methods: - deposit(amount): this method adds the amount to the balance withdraw(amount): this method subtracts the amount from the balance tostring): this method return Account # accountNo has QR balance. eg, Account #123 has QR1000. Export the BankAccount class module as an object. 2) Create app.js program. Declare accounts variable array and initialize it with the following ассou accounts: accountNo balance 123 1000 234 4000 345 3500 Display the content of the accounts array. 3) Create SavingRAccount class that extends BankAccount with an extra property: minBalance and an extra method distributeBenefitlbenefitPercentage). This method computes the monthly benefit using the balance += (balance * benefitPercentage). The constructor should extend BankAccount to initialize the minBalance. Also, extend the tostrine) to indicate that this is a Saving Account. eg, eg, Saving Account #123 has QR1000. Test savingAccount in app.js using the same table above and use a minimum balance of 500 for all accounts. 4) Create CurrentAccount class that extends BankAccount with an extra property: monthlyfee and an extra method deductfee). This method subtracts the monthlyfee from the account balance only if the deducted fee is less than the balance. The constructor should extend
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
![OPTION 1.- Banking App
In this exercise you will build a simple banking system according the design shown in Figure 1.
Flank
asunts : BenkAccoun
getivccountiacountNo:number:: Eanklccount
delsteAccoumaccountNo : number)
Aalance number
sumtalencer) number
seria toel): strn
deserialoccountsson: string: Eanktccount
BoOounNo: nmber
baance: numcer
dacostjamount numbor)
wihawMAncunt runte
tostrngl)
SavingAccount
CurentAccount
mt EH arte
dietributeberetbenetPercentape rumber
deductFee)
Figure 1. Banking System Class Diagram
1) Create BankAccount class with the following properties: accountNo, balance. This class
should have a constructor to initialize these 2 properties. This class should have these
methods:
deposit(amount): this method adds the amount to the balance
withdraw(amount): this method subtracts the amount from the balance
tostring(): this method return Account # accountNo has QR balance. e.g., Account #123
has QR1000.
Export the BankAccount cdass module as an object.
2) Create app.js program. Declare accounts variable array and initialize it with the following
accounts:
accountNo
123
balance
1000
234
4000
345
3500
Display the content of the accounts array.
3) Create SavingAccount class that extends Bankaccount with an extra property: minBalance
and an extra method distributebenefit(benefitPercentage). This method computes the
monthly benefit using the balance += (balance * benefitPercentage). The constructor should
extend Bankeccouot to initialize the minBalance. Also, extend the tostringl) to indicate that
this is a Saving Account. e.g., e.g., Saving Account #123 has QR1000.
Test saviogAccount in app.js using the same table above and use a minimum balance of 500 for
all accounts.
4) Create CurrentAccount class that extends Bankaccount with an extra property: monthlyFee
and an extra method deductfeel). This method subtracts the monthlyfee from the account
balance only if the deducted fee is less than the balance. The constructor should extend
BankAccount to initialize the monthlvfee. Also, extend the toStrinell to indicate that this is a](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F62171ff6-b42c-4b22-ab3b-b1407a1ec051%2Fa4dad01c-9ca1-49d5-a320-7938a865ff19%2F7dxtgj_processed.png&w=3840&q=75)
Transcribed Image Text:OPTION 1.- Banking App
In this exercise you will build a simple banking system according the design shown in Figure 1.
Flank
asunts : BenkAccoun
getivccountiacountNo:number:: Eanklccount
delsteAccoumaccountNo : number)
Aalance number
sumtalencer) number
seria toel): strn
deserialoccountsson: string: Eanktccount
BoOounNo: nmber
baance: numcer
dacostjamount numbor)
wihawMAncunt runte
tostrngl)
SavingAccount
CurentAccount
mt EH arte
dietributeberetbenetPercentape rumber
deductFee)
Figure 1. Banking System Class Diagram
1) Create BankAccount class with the following properties: accountNo, balance. This class
should have a constructor to initialize these 2 properties. This class should have these
methods:
deposit(amount): this method adds the amount to the balance
withdraw(amount): this method subtracts the amount from the balance
tostring(): this method return Account # accountNo has QR balance. e.g., Account #123
has QR1000.
Export the BankAccount cdass module as an object.
2) Create app.js program. Declare accounts variable array and initialize it with the following
accounts:
accountNo
123
balance
1000
234
4000
345
3500
Display the content of the accounts array.
3) Create SavingAccount class that extends Bankaccount with an extra property: minBalance
and an extra method distributebenefit(benefitPercentage). This method computes the
monthly benefit using the balance += (balance * benefitPercentage). The constructor should
extend Bankeccouot to initialize the minBalance. Also, extend the tostringl) to indicate that
this is a Saving Account. e.g., e.g., Saving Account #123 has QR1000.
Test saviogAccount in app.js using the same table above and use a minimum balance of 500 for
all accounts.
4) Create CurrentAccount class that extends Bankaccount with an extra property: monthlyFee
and an extra method deductfeel). This method subtracts the monthlyfee from the account
balance only if the deducted fee is less than the balance. The constructor should extend
BankAccount to initialize the monthlvfee. Also, extend the toStrinell to indicate that this is a
![4) Create CurrentAccount class that extends BankAccount with an extra property: monthlyEge
and an extra method deductfeel). This method subtracts the monthlyFee from the account
balance only if the deducted fee is less than the balance. The constructor should extend
BankAccount to initialize the monthlyfee, Also, extend the tostring() to indicate that this is a
Current Account. e.g., e.g., Current Account #123 has QR1000.
Test gyrcentAccount in app.js using the same table above and use a monthly fee of 15 for all
accounts.
5) Create Bank class to manage accounts. It should have a property accounts to store the
accounts. Also, it should have the following methods:
Method
Functionality
add(account)
Add account (either Saving or Current) to accounts array.
getAccount(accountNo)
Return an account by Id
deleteAccountlaccountNo) Delete an account by Id
avgBalancel)
SumBalansel)
serializel)
Get the average balance for all accounts
Get the sum balance for all accounts
Return accounts as a JSON string
Share PDF for
deserialize(accountslsen)
Takes JSON string representing accounts and returns an
array of accounts.
6) Create app.js program. Declare an instance of Bank class then add the following accounts:
accountNo
balance
type
minimumBalance monthlyFee
123
500
Saving
1000
234
4000
Current
15
345
35000
Current
25
456
60000
Saving
1000
I.
Test all the bank methods described above.
II.
III.
Display the total balance of all accounts.
Go through all the Current accounts and charge the monthly fee
Display the total balance of all accounts after charging the monthly fee.
Go through all the Saving accounts and distribute the benefit using a 5% benefit.
Display the total balance of all accounts after distributing the benefits.
IV.
V.
VI.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F62171ff6-b42c-4b22-ab3b-b1407a1ec051%2Fa4dad01c-9ca1-49d5-a320-7938a865ff19%2Fw2vbhld_processed.png&w=3840&q=75)
Transcribed Image Text:4) Create CurrentAccount class that extends BankAccount with an extra property: monthlyEge
and an extra method deductfeel). This method subtracts the monthlyFee from the account
balance only if the deducted fee is less than the balance. The constructor should extend
BankAccount to initialize the monthlyfee, Also, extend the tostring() to indicate that this is a
Current Account. e.g., e.g., Current Account #123 has QR1000.
Test gyrcentAccount in app.js using the same table above and use a monthly fee of 15 for all
accounts.
5) Create Bank class to manage accounts. It should have a property accounts to store the
accounts. Also, it should have the following methods:
Method
Functionality
add(account)
Add account (either Saving or Current) to accounts array.
getAccount(accountNo)
Return an account by Id
deleteAccountlaccountNo) Delete an account by Id
avgBalancel)
SumBalansel)
serializel)
Get the average balance for all accounts
Get the sum balance for all accounts
Return accounts as a JSON string
Share PDF for
deserialize(accountslsen)
Takes JSON string representing accounts and returns an
array of accounts.
6) Create app.js program. Declare an instance of Bank class then add the following accounts:
accountNo
balance
type
minimumBalance monthlyFee
123
500
Saving
1000
234
4000
Current
15
345
35000
Current
25
456
60000
Saving
1000
I.
Test all the bank methods described above.
II.
III.
Display the total balance of all accounts.
Go through all the Current accounts and charge the monthly fee
Display the total balance of all accounts after charging the monthly fee.
Go through all the Saving accounts and distribute the benefit using a 5% benefit.
Display the total balance of all accounts after distributing the benefits.
IV.
V.
VI.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education