Поскольку это ваш тест, я дам вам подсказки, а не весь текст решения
Random rnd = new Random;
while(array.size()>0){
// 1. use rng to get a index between 0 to current array.size()
// 2. remove the string by array.remove(index) so that it won't duplicated.
// 3. setText(string)
}
Попробуйте, вы можете добавлять комментарии, если вам нужно больше деталей.