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
The final task for part five is to create a function named manage movies.
It's going to be void.
We'll start by creating a new object of the scanner class.
This scanner object is going to receive input from the system system Dothan and the Java dock tells
us to create an infinite loop.
So we'll do that.
And we need to ask the user if they want to purchase rent return.
So you can just copy the snippet from the article.
And we'll start by picking up the user's response.
String response is equal to scanned.
Next line.
And first, we'll check if the response isn't equal to A, B or C.
Then we're going to close, scatter and break the loop.
If it's one of them, then we're going to ask them to name the movie they want to purchase rent or return.
Well pick up the response with scanned our next line.
And what we do with this movie depends on the user's previous response.
So we're going to make a switch statement that compares the users response against three cases.
Case A.
Casspi.
In Casey.
If it's they just sell them the movie story don't action name sell.
If it's case B, then we're going to rent them the movie.
And if it's Casey, let them return the movie.
And at the end, whatever their option was, we're going to print updated movies.
Followed by all the movies inside the store object.
And that's all.
Now we just got a call, this method from Maine.
First at our other movies to the collection.
Great to begin.
See them all here.
I'm going to start by purchasing a movie.
And you know what?
I want to make sure this happened in one line.
Kay.
Whenever we run the code.
I'll purchase The Dark Knight.
And it sells me The Dark Knight.
And you can tell it's been removed from the store.
Now I'm going to rent Pulp Fiction.
Then I'll return Pulp Fiction.
And this works perfectly.
Now I can just type anything to exit the loop.
And that's all.
We finished building our application.
The next step is to make a bulletproof, and we're going to do that in part six.
I will see you in there.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.