All language subtitles for 009 super() for Copy Constructor_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
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

A child class can use the constructor of its parent class.

The child class uses its constructor to update its unique fields.

And the child class uses the parent constructor to update inherited fields.

In this lesson, each child class is going to call the parent copy constructor.

So just a quick revision, super refers to the super class, which also means the parent class and super

rich brackets refers to the constructor of the super class, the constructor of the parent class.

If you want to call the the constructor of a parent class, you super an inside person, the object

you want to copy Fields' from.

So inside main, remove the array.

This was just to show you the flexibility of polymorphism.

And now set another object short to equal to a new copy of shirt.

But that's not going to work yet because we're calling it can't be constructive, it doesn't exist.

So here, copy the first instructor, as always.

And instead of getting values from a bunch of different parameters, we're going to get the values from

a source object.

And inside supercapacitor the source object.

Remember, super with brackets means we're calling a constructor.

So this means we're calling the copy constructor of the parent class parent class doesn't have a copy

constructor yet, so we're to have to create one.

So copy the first one, as always.

And instead of getting values from a bunch of different parameters, we're going to get the values from

a source, object, product source.

And once again, notice the polymorphism, the product copy constructor, expect a product object.

But we're passing in a shirt.

Remember that a class can take its own form or it can take the form of the class it's inheriting from,

in this case, the shirt object is taking the form of a product.

All right, put a break point, let's debugged there in time.

Creates a new object of the short class.

OK, this points to the current object that's being created.

Soares points to the object being passed in.

Here are passing the source object into the parent copy constructor.

There it copies the three fields from the source object into the current one.

And once the parent constructor is done, the child constructor copies the last field from the source

object into the current one, beautiful.

And now what if I want to create a copy of Pentz?

So Serpens to equal to a new copy of the pants object.

But that isn't going to work yet because we're calling a copy constructor that doesn't exist.

So here, copy the first constructor and instead of getting values from a bunch of different parameters,

it's going to get the values from a source object.

So inside, superbrain, a person, the source object.

And that's all.

Run the debugger.

It creates a new object of the pants class, the instructor receives a source object.

Here we're passing the source objecting to the parent copy constructor there, it copies three fields

from the source object into the current one.

And once the parent constructor is done, the child constructor copies of the last field from the source

object into the current one.

Let's recap a child class, can you do the copy constructor of its parent class?

The child uses the parent copy constructor to update inherited fields, and it can use its copy constructor

to update its unique fields.

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