CSC 349: The Week beginning Jan. 29 |
switch
statement
to connect the user's selected dog (e.g. Lhasa Apso) to the resourse R.drawable.lhasa_apso with cases
looking like
case "Lhasa Apso": ivDog.setImageResource(R.drawable.lhasa_apso); break;But this new version takes advantage of the relationship between the resource name and the dog breed name.