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
And this solution or inequality, quality control, the contact class, if the color misuses, the methods
are constructor's, we're going to throw an unchecked exception, which is going to force them to fix
their code.
We'll start with the constructor, the caller should not be allowed to pass on a name that is null or
blank, so if the name is null.
Our name is Blank.
Then we'll throw a new illegal argument exception.
Name cannot be null or a blank.
We'll do the same thing for the phone number.
If the phone number is null.
Or blank.
We'll throw in a legal argument exception.
The phone number also can't be less than five characters, so we'll check if the phone number at length.
Is less than five.
We'll throw another exception.
Ken, how should we throw an illegal argument, exception of birth date is another blank.
You can if you want, I would say it's not necessary simply because the constructor already throws a
check the exception, if the birthdate isn't passable.
Now we need to quality control our methods, starting with set name, the colour should not be allowed
to update an object with a name that is another blank.
So if the name that was passed in is null or blank.
You'll throw an exception.
Same thing for the phone number, we'll throw an exception if they enter a number that is null or blank.
We'll throw another one if the length of the phone number they pass down is less than five characters.
In which case, we'll throw a new exception.
Phone number cannot be less than five characters.
And inside birthday, there's nothing to really do because if the color were to pass in an invalid birth
date, the method would throw a pass exception.
Now you can feel free to test the exceptions by passing in wrongful values, just like we did in the
vending machine app.
But I'm going to wrap it up right here and move on to part four.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.