All language subtitles for 005 Part 2 (Solution) Tasks 5–7_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

In this video, we're going to finish up part two.

Task five is to the dispense action, and we have this beautiful document to guide us public boolean

dispense.

Takes two parameters, entero and then spot.

And first, we're going to check if the requested item has a bigger quantity than zero.

So if the item.

At the Rio.

And spot.

It's bigger than zero.

We're going to dispense that item from the vending machine, so we need to decrease its quantity by

one.

Set quantity.

We'll get the current quantity of what we're dispensing.

And minus one.

Then we need to return true to confirm that dispensing the drink was successful.

Otherwise, if there isn't enough of that item to dispense, then we're going to return false.

That's all Task six was to test the action, so inside me, I need to remove all code that comes after

creating the machine object.

I'm going to dispense a Pepsi bottle to the user twice, so I need to call the dispenser twice for the

item at Rosero and spot zero.

Machines that dispense zero zero.

All right, and this should decrease the quantity of the Pepsi item by two.

Let's make sure of that by printing the object.

At Rosero and Spot Zero.

And run your code.

And after selling these are two Pepsis, there's only one left Perfect's.

All right, let's clean up, we need to get ready for part three, so I'm going to remove all the code

that follows creating the machine object.

All right, I'll see you in part three.

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