I
I
Igor2017-01-10 14:11:37
Java
Igor, 2017-01-10 14:11:37

How is the song selected by the title variable?

How the song is selected by the tittle variable (should there be a selection condition)
What is the SoundPlayer Class
13d1c1fdb2364cf68272ecca84bef7ab.JPG

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2017-01-10
@booratina

The program enters main, then creates an object, then passes String (song and artists) to setters, then, through the play method, looks for the title of the song, choosing from objects (if (entered track number 1) play t.2 else s.3)

R
Rsa97, 2017-01-10
@Rsa97

The class is taken as an example. The choice of a song by name is implemented in the playSound() method, in which way it is not essential for this example.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question