All language subtitles for 047 Contacts – Part 5 (Solution)_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
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
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,550 --> 00:00:05,710 And this solution, we're going to quality control the manager class, almost every bad invocation of 2 00:00:05,710 --> 00:00:10,780 a method or constructor is because the caller passed an illegal arguments or called the method that 3 00:00:10,780 --> 00:00:11,410 about time. 4 00:00:15,470 --> 00:00:20,090 So looking at the code, I can't think of any illegal arguments the user may pass that haven't been 5 00:00:20,090 --> 00:00:23,900 accounted for because the constructor doesn't receive any parameters. 6 00:00:23,900 --> 00:00:26,210 So there's nothing to really check and hear. 7 00:00:26,210 --> 00:00:31,820 If the user passes a null instead of an actual object, the code would already throw a null pointer 8 00:00:31,820 --> 00:00:32,390 exception. 9 00:00:32,659 --> 00:00:35,770 So throwing in a legal argument exception would be redundant. 10 00:00:36,590 --> 00:00:40,130 The same argument can be made for ad contact and remove contact. 11 00:00:44,310 --> 00:00:46,300 What about illegal state exceptions? 12 00:00:46,830 --> 00:00:51,180 Remember that illegal exceptions occur when an object calls its method at a bad time. 13 00:00:51,690 --> 00:00:53,000 What about ad contact? 14 00:00:53,610 --> 00:00:58,250 If there was a maximum number of contacts that you can store, then you could throw an illegal state 15 00:00:58,260 --> 00:01:00,420 exception for that particular scenario. 16 00:01:00,780 --> 00:01:05,340 But if you were to go back and read the requirements, there is no limit to the number of contacts that 17 00:01:05,340 --> 00:01:05,880 you can add. 18 00:01:07,810 --> 00:01:13,210 Although an object would not be in a valid state to call or remove contact if the Israelis, it is empty, 19 00:01:13,630 --> 00:01:20,020 if there are no contacts to remove now, array lists have an empty method that returns true if it has 20 00:01:20,020 --> 00:01:20,800 no elements. 21 00:01:26,950 --> 00:01:28,840 So we'll check if contact. 22 00:01:31,300 --> 00:01:32,230 That is empty. 23 00:01:35,070 --> 00:01:37,950 And in such a case will throw a new illegal -- exception. 24 00:01:41,330 --> 00:01:44,600 You can't call the remove method if there are no contacts to remove. 25 00:01:50,360 --> 00:01:55,220 OK, I can't think of any more safety checks that we need to apply so we can wrap up right here. 2490

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