All language subtitles for 007 Bank Management – Part 4_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian Download
is Icelandic
ig Igbo
id Indonesian Download
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Welcome to part four, going back to requirements text, a checking account is taxable.

That means you can draw a line between checking vs. savings and loan by making checking taxable.

In other words, by having, checking, implement the taxable interface.

So inside taxable, we're going to create the method signature.

For a tax method that expects an income parameter.

OK, and now from checking, we're going to implement the taxable interface implements.

Taxable.

Remember that an interface is a contract of behavior, a class that implements an interface must override

all of its methods.

So in this case, we have to override tax.

And before we do anything, we want to create a unit test for this piece of behavior.

So back inside of account tests.

We're going to create another unit test that test called income tax.

Public void income tax.

And we'll just assume that person's total income ended up being three thousand.

So we'll just deposit that.

Or, you know what, make it 4000.

The president.

Accounts at Index zero dark deposit 4000 into the checking account.

And now, if you try to say accounts at index zero tax, you're not going to get any results because

right now every element in the accounts array is behaving as an account is taking the form of an account,

and the account class does not have a tax method.

So here it's basically telling you, what are you talking about?

But we can typecast the element at index zero to taxable because we know that checking account is taxable.

And now we can tax an income of 4000.

Don't tax.

Four thousand.

OK.

Now we're going to make an assertion.

After the taxes are deducted, the resulting balance should be five thousand three hundred and seventy

four point five one.

After we get the accounts, updated balance accounts and in zero, don't get balance.

OK.

Run the tests.

And it fails now we can write code to make it pass.

Inside of checking Java.

I'm going to create a static final variable private static.

Final double.

Taxable income.

Is equal to three thousand.

And according to the requirements, the tax rate is 15 percent.

So what I'm going to do is create another private static final.

Double.

Tax rate constant is equal to zero point one five.

All right.

And here what I'll do.

Is it going to set double tax?

Is equal to math a doubt, Max.

Because either the amount that can be taxed is zero or it's the income minus the taxable income.

The idea is that if the income is smaller than what's taxable, this is going to be negative.

So Max returns zero, which means we don't want to tax them anything.

Otherwise, if the income is bigger than what's taxable, then we're going to get some number that we

can multiply by the tax rates.

And that's going to be our tax.

Now we can tax the person's account by saying super upset balance, and we'll update the balance by

rounding whatever the result is.

And that result is going to be based on us getting the current balance and deducting the tax.

OK, if we rerun our test.

Test Java.

Everything works out.

Let's rerun all of our tests.

And we're good.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.