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
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:01,460 --> 00:00:03,350 In this video, we're going to finish up part two. 2 00:00:04,650 --> 00:00:11,010 Task five is to the dispense action, and we have this beautiful document to guide us public boolean 3 00:00:11,010 --> 00:00:11,880 dispense. 4 00:00:15,110 --> 00:00:18,590 Takes two parameters, entero and then spot. 5 00:00:22,560 --> 00:00:26,640 And first, we're going to check if the requested item has a bigger quantity than zero. 6 00:00:27,920 --> 00:00:29,030 So if the item. 7 00:00:34,630 --> 00:00:35,590 At the Rio. 8 00:00:37,990 --> 00:00:38,830 And spot. 9 00:00:45,880 --> 00:00:47,170 It's bigger than zero. 10 00:00:52,880 --> 00:00:57,830 We're going to dispense that item from the vending machine, so we need to decrease its quantity by 11 00:00:57,830 --> 00:00:58,190 one. 12 00:01:03,440 --> 00:01:04,400 Set quantity. 13 00:01:08,860 --> 00:01:11,650 We'll get the current quantity of what we're dispensing. 14 00:01:15,400 --> 00:01:16,450 And minus one. 15 00:01:20,560 --> 00:01:24,520 Then we need to return true to confirm that dispensing the drink was successful. 16 00:01:27,350 --> 00:01:32,210 Otherwise, if there isn't enough of that item to dispense, then we're going to return false. 17 00:01:36,010 --> 00:01:42,550 That's all Task six was to test the action, so inside me, I need to remove all code that comes after 18 00:01:42,550 --> 00:01:43,840 creating the machine object. 19 00:01:46,800 --> 00:01:52,080 I'm going to dispense a Pepsi bottle to the user twice, so I need to call the dispenser twice for the 20 00:01:52,080 --> 00:01:54,120 item at Rosero and spot zero. 21 00:01:57,770 --> 00:01:59,840 Machines that dispense zero zero. 22 00:02:10,889 --> 00:02:14,590 All right, and this should decrease the quantity of the Pepsi item by two. 23 00:02:14,790 --> 00:02:16,950 Let's make sure of that by printing the object. 24 00:02:22,290 --> 00:02:24,630 At Rosero and Spot Zero. 25 00:02:25,550 --> 00:02:26,600 And run your code. 26 00:02:38,430 --> 00:02:42,360 And after selling these are two Pepsis, there's only one left Perfect's. 27 00:02:43,830 --> 00:02:47,850 All right, let's clean up, we need to get ready for part three, so I'm going to remove all the code 28 00:02:47,850 --> 00:02:50,190 that follows creating the machine object. 29 00:02:51,000 --> 00:02:52,800 All right, I'll see you in part three. 2526

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