All language subtitles for 029 Sell Action_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,330 --> 00:00:02,460 We're going to have the first auction selling a car. 2 00:00:03,950 --> 00:00:08,660 The requirements state that a dealership can perform two auctions, sell a car and search for one. 3 00:00:10,390 --> 00:00:13,090 So in this lesson, we're going to add the selca action. 4 00:00:15,470 --> 00:00:21,410 Inside the dealership class at a method called sell public, the method is not going to return anything, 5 00:00:21,410 --> 00:00:24,950 but it needs an index parameter so that we know which car to sell. 6 00:00:30,120 --> 00:00:36,030 And selling a car implies that the customer is going to drive away with it, so we'll choose the car 7 00:00:36,030 --> 00:00:38,100 object at the index chosen by the user. 8 00:00:40,670 --> 00:00:42,170 And it needs to drive away. 9 00:00:43,500 --> 00:00:48,780 And after the car gets driven away, we need to remove it from the dealership, so set the car object 10 00:00:48,780 --> 00:00:49,770 that we just sold. 11 00:00:58,800 --> 00:00:59,700 Equal to No. 12 00:01:01,290 --> 00:01:04,730 All right, let's assume a customer came to buy the third Mesud. 13 00:01:04,920 --> 00:01:08,460 I want to stay consistent with my visuals, so we'll make this twenty seventeen. 14 00:01:09,270 --> 00:01:12,900 And now this car is in parking lot, too, so we'll sell it to them. 15 00:01:13,620 --> 00:01:17,100 Call Selca from the dealership object and pass in the index to. 16 00:01:34,950 --> 00:01:40,860 It prints them a happy message and it sells them the car driver runs the selca function, which prints 17 00:01:40,860 --> 00:01:46,890 a friendly message, setting the object at index to to know this frees up a parking space. 18 00:01:46,900 --> 00:01:48,780 And now we have room for another car. 19 00:01:50,750 --> 00:01:56,660 Also, I hope you notice how it's all starting to come together by planning our code around objets fields 20 00:01:56,660 --> 00:01:59,840 and actions, everything just fits together so smoothly. 21 00:02:00,470 --> 00:02:03,880 When I read this code, it's almost like I'm reading a story here. 22 00:02:03,890 --> 00:02:06,520 We have three cars, two Nissans and a Dodge. 23 00:02:07,040 --> 00:02:09,380 There is a dealership that owns all of these cars. 24 00:02:09,750 --> 00:02:14,720 Oh, the dealership just sold one of the cars and after selling the car, it gets driven off. 25 00:02:15,500 --> 00:02:17,210 The code is just so easy to read. 26 00:02:17,690 --> 00:02:21,140 And this is the power of object oriented programming. 27 00:02:21,560 --> 00:02:23,270 It makes your code expressive. 28 00:02:23,570 --> 00:02:29,030 And when your code is this expressive, you don't need to add comments because the code is already as 29 00:02:29,030 --> 00:02:30,110 clear as it's going to get. 30 00:02:32,260 --> 00:02:36,670 In this lesson, you added an action to your dealership class, there is one more action that we need 31 00:02:36,670 --> 00:02:38,890 to add and that is searching for a car. 3155

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