Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Let's cover part one task, one was that the necessary fields for the item class and looking back at
the requirements, there are only two.
The fields are private string name.
Private double price.
Now we want to apply the big three steps, the first step is to create a constructor.
It's going to receive two parameters string name and double price, and one, the constructor runs.
We have to set every field in the object equal to a parameter.
This dynamic will name the stock price equals price.
OK, now we want to autocomplete the getters and setters.
And the next task is that a tutoring method, public string.
Two string and just copy the format from the article.
Let's not forget the copy constructor in case we ever need to create copies of an object.
All right, we're done creating the item class, I know this is pretty standard stuff, but we should
always test our code in case we missed something so inside mean I'm going to print three objects of
the item class.
Go ahead and run the code.
And we get the expected output.
For the sake of practice, I'm not a breakpoint.
Launch the debugger.
And let's assume you want to step inside the constructor while it's inside of another function, then
why you would do is step into front line.
Then step out of it, keep repeating the step in and step out process until the next step into leads
us to the constructor for the first object.
Here we see the parameters.
And this points the current object we just created.
And it updates every field in the object with a parameter.
It's going to do the same thing for the spinach and for the coriander objects.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.