Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/ * * * ( 8 marks ) * @param target - the string to look for * @return An array of String objects which

/**
*(8 marks)
* @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 []
*
* HINT: Week 3 Lesson 2
*/

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

What are the purposes of strategic planning?

Answered: 1 week ago

Question

6. What qualifications are needed to perform the job?

Answered: 1 week ago