All language subtitles for 019 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
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,180 --> 00:00:04,019 We need to take a break from applying the big three steps and fix the copy constructor. 2 00:00:07,650 --> 00:00:12,690 So far, we fixed the constructor and we added a geter, the next step should be data center, but there's 3 00:00:12,690 --> 00:00:14,520 something missing in the copy constructor. 4 00:00:14,910 --> 00:00:16,590 So in this lesson, we're going to fix it. 5 00:00:18,840 --> 00:00:21,420 The copy constructor is missing a field update. 6 00:00:23,930 --> 00:00:29,520 We certainly stand to equal to a new object and passed in Nissan as an argument jarvis's the argument 7 00:00:29,540 --> 00:00:31,250 and Nossiter on the copy constructor. 8 00:00:32,400 --> 00:00:38,700 The parameter source story is a reference that points to the Nissan object, this refers to the current 9 00:00:38,700 --> 00:00:43,770 object, the one that's calling the constructor and the copy constructor copies every field from the 10 00:00:43,770 --> 00:00:46,080 source object into the current object. 11 00:00:49,880 --> 00:00:54,830 But wait, it doesn't copy the parts away from the source so that field stays null. 12 00:00:57,720 --> 00:01:02,700 All right, using a raised copy of we're going to set the parts field of the current object being created. 13 00:01:05,560 --> 00:01:07,150 Equal to a copy of the. 14 00:01:08,540 --> 00:01:10,460 Parts away from the source object. 15 00:01:18,240 --> 00:01:20,460 And we're going to copy the full length of the array. 16 00:01:27,140 --> 00:01:30,410 And they're now everything should work, you run your code and test it. 17 00:01:43,810 --> 00:01:48,190 And it works as expected, Nissan 2s parts field, is it not anymore? 18 00:01:50,220 --> 00:01:54,330 The copy constructor copies every value from the source object into the current object. 19 00:02:07,440 --> 00:02:13,890 And now I'm fully confident that every object defines fields and all of these fields have been provided 20 00:02:13,890 --> 00:02:21,090 a value one way or another and finally noticed that both constructors are identical in the first constructor, 21 00:02:21,100 --> 00:02:26,400 we're using parameters to update each field and in the second one, we're updating each field from another 22 00:02:26,400 --> 00:02:27,010 object. 23 00:02:27,360 --> 00:02:29,070 The differences are very minor. 24 00:02:31,660 --> 00:02:37,120 In this lesson, you fixed the copy constructor, each car object has Fifield's, but the copy constructor 25 00:02:37,120 --> 00:02:40,990 was only updating four of them, so we added the extra field updates. 2710

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