All language subtitles for 044 Contacts – Part 2 (Solution)_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

The hard part is over now we're going to add what's left of the Big Three steps, as well as a copy

constructor in a two string.

And so we can use Intellisense to autocomplete, the gutters and setters, get a name, get phone number.

Get birthdates.

Get a age.

Set name.

That phone number said birthdates.

First, we're going to make that a private.

We need to hide this setar because the color shouldn't be allowed to use it.

The birthdate that they pass in should automatically determine the age, so inside set birth date.

So far it's fine, which it's just updating the birth dates, but it also needs to convert that date

into an age.

We've already done that.

So you might think they just copy and paste the code from the constructor right onto here.

But you know me, I'm not a big fan of copying and pasting code, we need that logic to be in one place.

So I'll create a function that returns an integer.

It's called to age and it receives a birth date as a parameter.

And inside the function, I'm going to cut and paste the logic from earlier.

In return, the.

The pass method throws a checked exception once again, don't catch the exception from inside the method.

Instead, the method is going to throw the exception to that.

Whoever is calling it handles the failure.

So back in the constructor.

The field is going to store the return value from the two major method.

And while the code looks so much better, I'm really glad we did this.

And now here inside set birthdates.

We're going to call Sage.

And will convert the birthdate to age and pass it in as an argument to basically when the caller updates

the birth date, it's going to automatically update the field as well.

But now to age throws a pass exception, but we're not going to try catch inside of our method.

Instead, the method is going to throw the exception to that.

Whoever is calling it, whoever is the one that's providing the birth dates, they need to be the ones

to handle the failure.

Before we go on, this is a good place to test our code.

I'm going to go back to Main.

Put this back to 07.

And update the birthdate.

Instead of 07 will say 08.

A lot of breakpoint right here.

I'll step over creating the object.

The contact variable star is a reference that points to the object here we update the object on step

inside, it updates the birth date.

I'm going to step over this line and here it updates the age.

But as you can see, a month, does it really make a difference?

So we'll change the year.

And there you go.

Updating the birthdate automatically updates the.

If we keep going, finally runs and prints, process completes, we're good so far.

The next step is that a copy constructor, because at some point we're going to need a way to copy contact

objects without falling into the reference trap so we can simply copy this constructor and instead of

parameters, will be obtaining values from a source object.

Then said every field in the current object equal to that field value from a source object, nothing

new here.

Let's visualize what's going on back in Maine, I'm going to create a new contact object that copies

every field from this one.

New contact.

Contact.

This points to the new contact object that we just created.

Soares points to the object that we passed in.

And one by one, we're copying every value from the source object into the current object.

The next task tells us that every class that models an object should have a two string method somehow

attached to string method to the class.

Public string.

To string and we'll copy over the format that I left you.

And will replace the placeholders where we need to.

And perfect, we're done creating the contact class, let's test it out inside mean I'm going to print

the object.

And everything works beautifully.

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