All language subtitles for 058 Movie Store – Part 6 (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

Original subtitles

The very last step is to bulletproof the application, in other words, to make sure the application

doesn't fail or crash no matter what happens right now, there are many scenarios where an unchecked

exception could be thrown during the run time and crash the application.

We can't allow that to happen.

So let's run the up.

The first vulnerability in the app is if the user enters a blank movie name.

The movie constructor is going to throw an illegal argument exception, and as you know by now, if

we get an unchecked exception, it's our fault and we have to fix it.

And what we're missing is code that anticipates a scenario where the user may enter a blank name.

So here will say if name is blank.

Then we'll print the following message.

Then we'll restart the loop with continue.

OK, let's run our code.

And if we had a blank name, our application handles the response with grace.

You know what, if I rent a movie?

Then I'll try to purchase that same movie.

And the Atheros, an illegal state exception, crashing the app, we cannot allow the user to purchase

a movie that has already been rented.

So I'll go back in main.

And I'm going to check if the movie is rented.

Wait, how do I do that?

Right now, we can't we need to declare a method inside Staudt Java that returns a movie based on a

name.

So public movie get movie.

It's going to take one parameter string name.

I'm going to create a loop that runs through the size of the array list.

And will say if movies.

We'll get the movie at the request index.

doGet name will check if it equals the name being Pastan.

Then we're going to return the movie object at that inducts.

Otherwise, we're going to return now.

Now, back in Maine, I can get the movie the user is interested in iStore get movie.

We need to check if it's not available.

And if that's the case, will print the following message.

Movie is not available for purchase and restart the while loop.

OK, let's test this out.

I'm going to rent a movie.

Try to purchase that same movie.

And the application responds with Grace, it's not available for purchase.

Now, I'm going to try to purchase another movie, but I'm going to type a movie that isn't on their.

We'll say Django.

And it crashes null pointer exception.

The issue is that the function we just added returns and null if it can't find the movie.

And trying to dot syntax from a nul is going to result in a null pointer exception.

So we need to handle that as well.

So here, instead of checking if the name is blank, I can just make the condition check if the movie

they added doesn't exist.

This condition would account for everything.

Kate running the app.

I'll put a movie that doesn't exist in the collection, we're a good.

I'm going to put a blank movie, we're good.

Our condition is perfect.

And with this final line of code, I'm proud to say that we're all finished no matter what we do, the

application is going to respond with Grace and it's working really well, just like that.

Our application is bulletproof.

No matter what the user throws at us, the application is free of bugs and it's never going to crash.

It can process any input and respond with grace.

In the end, exception handling, which involves catching checked exceptions and fixing unchecked exceptions,

is the key to building bulletproof applications.

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