All language subtitles for 055 Movie Store – Part 4 (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 Download
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

Original subtitles

In this solution, we're quality control the store class, we need to forbid the caller from misusing

the methods or the constructor, the constructor doesn't receive any parameters.

So there's nothing to check here.

There is nothing to quality control in the setar, because if the caller happens to pass a no instead

of an actual object, the code would already throw a nail pointer exception.

So throwing our own exception would be redundant.

The same thing can be said for ad movie.

However, there's a lot to quality control in the action, first of all, if the store object doesn't

have any movies, then it's not an illegal state to call the method.

You can't return, sell or rent a movie that doesn't exist.

So here, we'll say if movies, that is empty.

We'll throw a new.

Illegal state exception.

Store not in a valid state to perform action.

One more thing we want to check is that the action they want to perform can only be one of three things

sell, rent or return.

So if the caller passes anything else, we need to throw an exception.

So if the auction they pass, if it doesn't equal sell.

Or if it doesn't equal rent.

Or if it doesn't equal return.

Then we'll throw a new illegal argument exception.

Action must be sell, rent or return.

All right, and the color shouldn't be allowed to pass a name that's blank, so if the name is equal

to No.

Or the name is equal to blank.

We'll throw a new illegal argument exception.

Name Kaname Neller Black.

And the last thing we're going to do is forbid the caller from trying to sell a movie that has already

been rented.

So inside, so we're going to check if the movie at the index.

That was a request that is not available.

Then we're going to throw a new illegal state exception, because the state of the movie object that

we're trying to sell is inappropriate for this operation.

We'll just say cannot sell a movie that was rented out.

And that's all the quality control we need to apply and now this method is going to forbid the caller

from misusing it, if the caller does misuse it, their application is going to crash and they're going

to have to fix their code.

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