All language subtitles for 002 Part 1 (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

In this video, I'm going to cover part one of the vending machine application.

The first task was to add the necessary fields to the item class, and if you look back at the requirements,

the fields are private string name.

Private double price.

And private int quantity.

All right, now, remember that if a class is fields, you need to apply the big three steps.

We need to take instructor getters and setters and the constructor is going to be public.

It's going to take as many parameters as there are fields, so three.

And the constructor runs when you create a new object, so we're going to set every field in that object

equal to a parameter value.

All right, simple enough, and now we can use Intellisense to autocomplete, the getters and setters.

Now, Task three told us to add a copy constructor because at some point we're going to need a way to

copy Eitam objects without falling into the trap so we can simply copy this constructor.

And instead of parameters, we're going to be obtaining values from a source object.

And then we're just going to set every field in the current object equal to the field value from a source

object.

All right, and now task force tells us that every class that models an object should have a two string

method.

So we're going to add it to three methods, our class.

And copy over the format.

And will replace the placeholders where we need to.

This name.

Colin.

The stock price.

Put a space here where they put a bracket.

Embed the quantity inside of another Brackett's.

All right, we're done creating the item class.

So inside main.

I'm going to create a new object of the item class.

I'm going to pass in an item named Pepsi worth three ninety nine.

And there is going to be three Pepsis inside the vending machine.

All right, and we can print the object.

Run the code.

And everything works beautifully.

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