100 POINTS AND BRAINLIEST. REPORTING IF YOU DON'T ANSWER
Question 1:
Design a BankAccou...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 13.12.2020 03:20 daeshawnc14
100 POINTS AND BRAINLIEST. REPORTING IF YOU DON'T ANSWER
Question 1:
Design a BankAccount Class with the following requirements:
1. Class variables
- Overdraft Fee = 20 (Overdraft fee is subtracted from the account when account balance is negative after a withdraw)
2. Object variables
- Balance (Balance is the amount of money an account has left)
3. Methods
- deposit(amount): Accepts an argument amount of type number, adds this amount to account's balance
- withdraw(amount): Accepts an argument amount of type number, subtract this amount to account's balance, if the resulting balance is negative, apply an Overdraft Fee on the account balance
Test your class to see if it works:
- Scenario 1:
- Create a new account called "college_checking", assign 1000 dollars to the initial balance.
- Withdraw 200 dollars
- Withdraw 500 dollars
- Deposit 100 dollars
- Withdraw 600 dollars
- Check your remaining balance, it should be -220 dollars of balance, because $1000 - $200 - $500 + $100 - $600 - $20(overdraft) = $-220
- Scenario 2:
- Create a new account called "europe_trip_fund", assign 0 dollars to the initial balance.
- Deposit 250 dollars
- Deposit 220 dollars
- Deposit 530 dollars
- Withdraw 721 dollars
- Check your remaining balance, it should be $279 dollars of balance, because $0 + $250 + $220 + $530 - $721 = $279
Question 2:
Design a that inherits from BankAccount Class with the additional requirements:
1. Methods
- withdrawal(amount): Accepts an argument amount of type number, subtract this amount to account's balance, if the resulting balance is negative, log an error message:
"There's insufficient funds in your account to complete this transaction"
to the terminal and stop the transaction so that your balance isn't overdrafted.
Test your class to see if it works:
- Scenario 3:
- Create a new account called "personal_checking", assign 100 dollars to the initial balance.
- Withdraw 20 dollars
- Withdraw 50 dollars
- Deposit 12 dollars
- Withdraw 60 dollars
- Check your remaining balance, it should be 42 dollars of balance, because $100 - $20 - $50 + $12 = $42, the last withdrawal didn't go through because that would leave your account balance negative.
![ansver](/tpl/images/cats/User.png)
Answers: 2
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 18:30
Which of the following is an example of intellectual properly! oa. new version of a novelb. journal of ideasc. pages of a bookood. lines of a poem
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 04:20
Which network media uses different regions of the electromagnetic spectrum to transmit signals through air? uses different regions of the electromagnetic spectrum to transmit signals through air.
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 06:30
How do you write an argumentative essay about the importance of free enterprise ?
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 15:30
Brian wants to conduct an online search with a certain phrase. he intends to use the words books that belong to the 1800s in his search. how should he use the word that in his search?
Answers: 1
You know the right answer?
Questions
![question](/tpl/images/cats/en.png)
English, 03.03.2020 19:58
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 03.03.2020 19:58
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/health.png)
Medicine, 03.03.2020 19:58
![question](/tpl/images/cats/geografiya.png)
Geography, 03.03.2020 19:58
![question](/tpl/images/cats/mat.png)
Mathematics, 03.03.2020 19:58
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 03.03.2020 19:58
![question](/tpl/images/cats/en.png)
English, 03.03.2020 19:58
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/User.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/en.png)
English, 03.03.2020 19:58
![question](/tpl/images/cats/health.png)
Health, 03.03.2020 19:58
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 03.03.2020 19:59
![question](/tpl/images/cats/biologiya.png)
Biology, 03.03.2020 19:59