Question: @param target - the string to look for * @return An array of String objects which contains the filenames of Photo objects in * photos

@param target - the string to look for
* @return An array of String objects which contains the filenames of Photo objects in
* photos which contain the parameter target.
*
* e.g. If the photos array contained the following:
* photos =[
* Photo(filename = "catpicture1"),
* Photo(filename = "cat2"),
* Photo(filename = "othercatpicture"),
* Photo(filename = "lotsofcats"),
* Photo(filename = "dog"),
*]
*
* Example 1
* findPhotosContaining("cat") should return the array:
*[
* "catpicture1",
* "cat2",
* "othercatpicture",
* "lotsofcats"
*]
*
* Example 2
* findPhotoContaining("picture") should return the array:
*[
* "catpicture1",
* "othercatpicture"
*]
*
* Example 3
* findPhotosContaining("abc123") should return the array []
*

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!