Alright so here I'm going to give you a specification for a 1
typescript class that I want you to create that will be a 2
bank account okay and so there are several operations that I 3
want you to implement in this bank account class so here they 4
are. So first of all we will work on the basic operations so 5
you have to be able to add money to bank account to 6
withdraw money from the bank account and to get the current 7
balance so this should be pretty simple then be careful 8
you will have to also check the minimum balance okay so you 9
will have to ensure that the funds are sufficient to 10
withdraw otherwise you will have to throw an error so if 11
the savings are under zero you will have to throw an error 12
then this one is a bit complicated we will have 13
mensual interests so an account as a percent of 14
menstrual interests and we should be able to get at any 15
time the amount of mensual interest okay so basically we 16
should be able to define a percent of interest for example 17
1% for one account and so for example if there is $1, 000 on 18
the account then the menstrual interest should be $10 okay 1% 19
of 1000 you don't have to modify the current balance or 20
savings okay we just want that to know what the mensual 21
interest are okay it shouldn't modify anything okay we just 22
want to be able to calculate them. Then there is a ceiling, 23
a limit on the mensual interest that you can earn. So 24
for example, you should be able to set the limit. So for 25
example, let's say $50, 000, okay? So for example, if the 26
interested are calculated on this maximum of 50thousand 27
dollars, then it means that if you have, for example, $52, 28
000, you'll still have only 1% of 50000 as mensual interest. 29
So 50000 will be the limit okay? Uh otherwise if you are a 30
billionaire then 1% of one billion would be a lot so 31
the bank doesn't want that okay. They don't want you to 32
earn too much money. And finally you should be able to 33
manage your favourite accounts. Meaning that you should be able 34
to access the list of your favourite accounts from one 35
account. So one account as a list of favourite accounts and 36
we can add an account into the list. And we should be able 37
remove an account from the list using its ID okay so as you can 38
see there is quite some work to do once you will have 39
completely build your bank account class, then we will write 40
a story okay and here is the story that you will have to 41
write you will have to create two bank accounts a bank 42
account one and a bank account 2, 1 with $40, 000 in the bank 43
account one and one with $100, 000 in the bank account two 44
then you set 1% of mensual interest for each of this 45
account okay and you will set an interest ceiling of $50, 000 46
for each of this account okay so they they will have the same 47
data except the initial savings okay the initial balance then 48
you will add the bank account to to bank account one 49
favorites then you will transfer $20, 000 from bank 50
account one to its first favorite bank account so 51
technically should have only one bank account in its 52
favorite and you should target the first one in this list. 53
Then you will withdraw 25000 dollar from bank account 54
one and you will catch the error if there is one. Then you 55
will display the amount of mensual interest on bank 56
account one. Then you will display the balance of bank 57
account one and finally you will remove the bank account 58
two from bank account one favourites. Okay? And I 59
actually don't think I said that but in the basic 60
operations here I'm going to add one you should be able to 61
transfer money to another account. 62
So obviously I'm going to share that with you so you can use it 63
while building your bank account and your story so try 64
your best it's alright if you kind of do it but try to type 65
everything as much as you can try to make sure that 66
everything is safe and you handle all the errors and yeah 67
good luck and see you in the next one