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

Original subtitles

We're going to have the first auction selling a car.

The requirements state that a dealership can perform two auctions, sell a car and search for one.

So in this lesson, we're going to add the selca action.

Inside the dealership class at a method called sell public, the method is not going to return anything,

but it needs an index parameter so that we know which car to sell.

And selling a car implies that the customer is going to drive away with it, so we'll choose the car

object at the index chosen by the user.

And it needs to drive away.

And after the car gets driven away, we need to remove it from the dealership, so set the car object

that we just sold.

Equal to No.

All right, let's assume a customer came to buy the third Mesud.

I want to stay consistent with my visuals, so we'll make this twenty seventeen.

And now this car is in parking lot, too, so we'll sell it to them.

Call Selca from the dealership object and pass in the index to.

It prints them a happy message and it sells them the car driver runs the selca function, which prints

a friendly message, setting the object at index to to know this frees up a parking space.

And now we have room for another car.

Also, I hope you notice how it's all starting to come together by planning our code around objets fields

and actions, everything just fits together so smoothly.

When I read this code, it's almost like I'm reading a story here.

We have three cars, two Nissans and a Dodge.

There is a dealership that owns all of these cars.

Oh, the dealership just sold one of the cars and after selling the car, it gets driven off.

The code is just so easy to read.

And this is the power of object oriented programming.

It makes your code expressive.

And when your code is this expressive, you don't need to add comments because the code is already as

clear as it's going to get.

In this lesson, you added an action to your dealership class, there is one more action that we need

to add and that is searching for a car.

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