Consider the following method, which is intended to return true if at least one of the three strings s1, s2, or s3 contains the substring "art".; Otherwise, the method should return false.

public static boolean containsArt(String s1, String s2, String s3)
{

String all = s1 + s2 + s3;
return (all.indexOf("art") != -1);

}

Which of the following method calls demonstrates that the method does not work as intended?
Select one:
a. containsArt ("rattrap", "similar", "today")
b. containsArt ("start", "article", "Bart")
c. containsArt ("harm", "chortle", "crowbar")
d. containsArt ("matriculate", "carat", "arbitrary")
e. containsArt ("darkroom", "cartoon", "articulate")
a. containsArt ("rattrap", "similar", "today")

This is because the "art" is found as a combination of "similar" and "today". That is not as intended based upo

Answers

Answer 1

There are several ways to manipulate strings; this includes concatenating and iterating through strings.

The method call that does not work as intended is: (a) containsArt ("rattrap", "similar", "today")

From the question, we understand that the method would return true if any of s1, s2 and s3 contain the string "art"

From the list of given options, none of the strings in the method call (a) contains "art". i.e. "rattrap", "similar" and "today" do not contain "art"

But the method call would still return true.

When "rattrap", "similar" and "today" are concatenated on the first line of the method, the new string  "rattrapsimilartoday" contains "art".

Hence, the method call that does not work as intended is: (a) containsArt ("rattrap", "similar", "today")

Read more about strings at:

https://brainly.com/question/16024994

Answer 2
                              Answer:

There are several ways to manipulate strings; this includes concatenating and iterating through strings.

The method call that does not work as intended is: (a) containsArt ("rattrap", "similar", "today")

From the question, we understand that the method would return true if any of s1, s2 and s3 contain the string "art"

From the list of given options, none of the strings in the method call (a) contains "art". i.e. "rattrap", "similar" and "today" do not contain "art"

But the method call would still return true.

When "rattrap", "similar" and "today" are concatenated on the first line of the method, the new string  "rattrapsimilartoday" contains "art".

Hence, the method call that does not work as intended is: (a) containsArt ("rattrap", "similar", "today")

Read more about strings at:

brainly.com/question/16024994


Related Questions

try drawing the bass clef sign by tracing over the dotted lines. then draw five more on your own

Answers

Answer:

ok

Explanation:

did it. It was a little difficult to keep my pencil straight.

Exercise 3.6.9 24 vs “24”

Answers

Answer:

that's good exercise

Explanation:

where is the question ⁉️

help please! I don’t know how to do this :’).

Answers

That is the base code right there though.

Another term for the plot structure of the hero journey

Answers

monomyth: In narratology and comparative mythology, the hero's journey, or the monomyth, is the common template of stories that involve a hero who goes on an adventure, is victorious in a decisive crisis, and comes home changed or transformed.

write a reflection on what you have learned for this week. write your answer on the space inside the cloud.(Minimum of 30 words)​

Answers

Answer:

“I think it’s about putting yourself in the students’ shoes and seeing how a first-time student, maybe someone who hasn’t even taken chemistry before, is looking at it.”

—Valerie Taraborelli, undergraduate chemistry student, University of Arizona

If you were to design a real robot that would be responsible for cleaning up trash, what 5 (or more) commands would you give it and what would each one do?

Answers

Los 5 comandos de mi robot limpiador serían: Classify, recycle, sweep, washing, and alarm.

A robot is a machine that is characterized by being controlled by a computer and programmed to move, manipulate objects and carry out work while interacting with its environment.

The 5 commands with which I would configure my robot to clean the garbage would be:

Classify: To classify the garbage, deposit the recyclable wastes and those that are not in different bags.Recycle: Take recyclable objects and process them inside to turn them into new objects such as recycled sheets of paper.Sweep: For the robot to sweep a surface and remove all kinds of dirt.Washing: This function would be to clean the dirt from a car, motorcycle, or bicycle with a jet of water under pressure.Alarm: This functions as a reminder of the days and hours in which the garbage truck passes to take the garbage to the right place.

Learn more in: https://brainly.com/question/1935813

HELLLLLLLLPPP

Read the list of courses from a technical school (w3schools).

Which courses would prepare for you for a career in web development?
(Choose more than one answer)

Designing for Usability
Introduction to Networks
Technical Writing
Cybersecurity

Answers

I believe it’s all of them. They all help with the development of websites

Viết thuật toán và chương trình: Tính tổng:
S=1+2+...i

Answers

Answer:

skdjsjwjdjcdjejxjdjxjdjwjsjxjdwiskxmdjxkdnejxj

Explanation:

justnejedjdfhjxnfbcjccjcuvjjfhedcjcjchcjeidchdjchcjdjcjcucjf

the recovery of stored information is called _____.

Answers

Answer:

it is called the memory retrieval

The recovery of stored information is called memory retrievel.

What is information?

A broad concept that represents something with the potential to inform is known as "information." Information is most fundamentally concerned with the interpretation of what may be sense. Informational texts have facts and text components including glossaries, tables of contents, photos, captions, and bold print.

Retrievel is defined as a method of retrieving information from memory. Retrieval cues are stimuli that can help with memory retrieval. In a process known as "ecphory," memory retrieval involves the interaction of external sensory or internally produced cues with stored memory traces (or engrams). Ecphory has been studied in human cognitive neuroscience research, but less is known about its neurological basis.

Thus, the recovery of stored information is called memory retrievel.

To learn more about information, refer to the link below:

https://brainly.com/question/13629038

#SPJ12

Hello, this is for my compute science class, and I don’t know the answer, please help? Thank you in advance =)

Answers

Haven't taken Computer Science in a year so my answer may be wrong (APCSA).

Defining Column B,

Selection is when a piece of code is run only when its conditions are met. Iteration is typically represented by for loops, enhanced for loops, and while loops, and will all repeat until a condition is met.Sequence is usually the simplest, carrying out commands in order.

From what I see, the first box in column A is a sequence as it defines and casts num1 and num2, computes its difference in int form, and prints it out. The second box in column A is a selection even though it counts to 5 in the first segment of code. The key here is the if else statement as it checks that num1 is greater than num2 before it subtracts. The third box in column A is an iteration due to its enhanced for loop.

Hope that helps! :)

Lập trình đếm xem có bao nhiêu số chẵn , bao nhiêu số lẻ trong đoạn từ M đến N

Answers

I don’t understand your language pls translate it to English

Is all the information on the Internet truthful? Why or Why not.

Answers

All of the information on the internet is not truthful because some people just say things to say things and they don’t have accurate answers.

Answer:

No

Explanation:

Not all information that you read on the internet is true because some szites let other people post information that has no facts to back it up.

state five differences and similarities between a desktop and a laptop computer​

Answers

Answer:

Difference:

1. screen size

2. Device needs external power source

3. Not portable

4. Much more powerful cores

5. Multiple internal drives

Similarities:

1. Can access the internet

2. Same operating system

3. components are similar

4. Applications can be run on both

5. They have the same purpose.

hey guys can u tell me

5 advantages of spread sheet
kinda urngent ?​

Answers

Explanation:

Spreadsheets Improve Data Organization.

Easing Collaborative Data Collection.

Spreadsheets Enable Dynamic Calculations With Built-In Formulas.

Spreadsheets Are Equipped With Preset Functions.

Spreadsheets Provide Functionality For Graphing And Visual Aids.

the process by which information gets into memory storage is

Answers

Answer:

That is the first step and it is called encoding process.

what is the first step in the process of deploying a cloud computing offering?

Answers

Answer:

The first step in the process of deploying a Cloud Computing is to choose a suitable Cloud Provider such as AWS, Azure, or GCP. Once you have successfully chosen the cloud provider, you need to create an account to login and make use of the services of that provider.

Explanation:

yes but i’m and carter can go to

What Is What is the difference between system software and application software?

Answers

Answer:

Hope it helps have a nice day..

Which decimal number is equivalent to this binary number?
001100112

A.
15
B.
51
C.
204
D.
240

Answers

Answer:

51

Explanation:

multiply the digits with the position value starting from Rightmost

0011 0011

(0*2^7) +(0*2^6)+(1*2^5) +(1*2^4)+(0*2^3) +(0*2^2)+(1*2^1) +(1*2^0)

solve the exponents

= 0+ 0 +32+16+0+0+2+1

=51

Which is non executable statement used to write some information.​

Answers

Answer:

Programming command that is not run or executed when being read by the computer. For example, a commonly used nonexecutable statement is REM (remark) used in batch files and other Microsoft Windows and DOS programs.

What should the car be programmed to do if it encounters an unavoidable accident? (about autonomous vehicles)(help me :c)

Answers

Answer:

The nation proposed that: “self-driving cars should always attempt to minimize human death and shouldn't discriminate between individuals based on age, gender, or any factor. Human lives should also always be given priority over animals or property” (Nowak).

Which entry by the user will cause the program to halt with an error statement?
# Get a guess from the user and update the number of guesses.
guess = input("Guess an integer from 1 to 10.)
guess = int(guess)
seven
3
65
-25

Answers

Answer:

seven

Explanation:

Look at python data types

float=decimalint=integerstr=string

seven is a string not integer

So it will raise error

Who is the person that is on location reporting the news?.

Answers

Answer:

journalist

Explanation:

A journalist is an individual trained to collect/gather information in form of text, audio or pictures, processes them to a news-worthy form and disseminates it to the public. The act or process mainly done by the journalist is called journalism.

!!!!!HELP!!!!! (30PTS)
Suppose you are using a Mac to read your e-mail messages, and your receive an e-mail message with a PowerPoint file attached. PowerPoint is not installed on the Mac you are working with. Which of these could you use to view the file? Choose all answers that are correct.
A. a text editor
B. Keynote
C. PowerPoint Online
D. a photo editor

Answers

Answer:

B. KN

C. PP Online

Explanation:

KN is A's own software for creating slideshow presentations. However, since most people using KN are coming from using MS PP, there is the option to open PPs in KN (albeit with some fonts missing).

You can also view the file from PP Online. Just create a MS account (if you don't already have one), download the email attachment and upload it to your cloud, and you should be able to view it there.

Sammy’s Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. Write a program that prompts the user for the number of minutes they rented the piece of sports equipment. Compute the rental cost as $40 per hour plus $1 for each additional minute. (Fix the logic error from Sammy's Rental program)



Display Sammy’s motto “Sammy’s makes it fun in the sun” surrounded by a border composed of repeated “Ss.” Save the file as SammysRental2.java

I just need lines of code and thats it

Answers

Answer:

import java.util.*;

public class SammysRentalPrice {

public static void main(String[] args) {

 System.out.println("SsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSs");

 System.out.println("Sammy's makes it fun in the sun");

 System.out.println("SsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSsSs");

 Scanner s=new Scanner(System.in);

 System.out.print("Enter the rented minutes:");  

 int min=s.nextInt();

 int hours=min/60;

 min=min%60;

 int tot_cost=(hours*40)+(min*1);

 

 System.out.println("total hours is: "+hours);

 System.out.println("total minutes is: "+min);

 System.out.println("total cost is: "+tot_cost);

 

}

}

Explanation: This is the code I made.

Who is responsible for the actions of autonomous systems? (please help me :C)

Answers

The responsibility for failures was deflected away from the automated parts of the system (and the humans, such as engineers, whose control is mediated through this automation) and placed on the immediate human operators, who possessed only limited knowledge and control.

Ohio university college

g bookmarks
5 4v
Next →
Illustrating Documents: Mastery Test
Type the correct answer in the box. Spell the word correctly.
What aspect should you consider before adding pictures to a document?
You should structure the
first before you search for a relevant picture.
Reset
Next

Answers

Before you search for a relevant picture you should first reset the structure.

When adding pictures to a document, you should first structure the reset and then look for a pertinent image. So, the correct option is A.

What are Pictures?

A photograph is an image made by light striking a photosensitive surface, either photographic film or an electronic image sensor like a CCD or CMOS chip. It is also referred to as a photo, image, or picture.

Any visual thing that has been edited or manipulated by a computer is referred to as an image, as is any imagined object produced by a computer. Everything captured by a camera, digital camera, or photocopier is a photo or photograph. A picture is a digitally produced sketch, painting, or other piece of art.

For above given example, when adding pictures to a document, we should first structure the reset and then look for a pertinent image.

Thus, the correct option is A.

Learn more about image, here:

https://brainly.com/question/2976060

#SPJ7

!!help please!!
Which type of data is shown here?​

Answers

It is string data. That means it is a sequence of characters

The data shown, "Monkey," is an example of a string data type. Therefore option B is correct.

In programming and computer science, a string is a sequence of characters (letters, numbers, symbols) that represent textual data.

Unlike numeric data types (A), which represent numbers, or Boolean data type (D), which represents true or false values, a string is used to store and manipulate text-based information.

Strings are commonly used to store names, sentences, messages, and other textual data in various programming languages and data structures.

In this case, "Monkey" is a text-based representation of an object or concept, making it a string data type.

Therefore option B string is correct.

Know more about programming languages:

https://brainly.com/question/23959041

#SPJ5

cyber law of nepal and it's provisions​

Answers

hope it helps .........

Help please answer the question 1 2 3 4 5 6

help

Answers

Answer: A,c,a

Explanation: trust

Just did it

You can change the size of text using which block of code?

text ("medium", 130, 200);

textSize (pixels);

text, ("large", 120, 300);

Answers

Answer:

B.

Explanation:

Mark Brainliest if correct!

Other Questions
In a particular part of the Volta lake, there is a population of 100000 tilapia. The number of tilapia is decreasing at a rate of 10% per year due to pollution from a human settlement on the shores of the Volta lake in this area.2. Copy and complete the table below to show the number of tilapia P after 1, 2 and 3 yearsNumber of years (t) 0 1 2 3Number of tilapia (N) Criterion B 1-2b) Write an exponential model for the number of tilapia N after t yearsCriterion B 3-4c) When the population of tilapia falls below 25000 it is at a critical level. Write an inequality and calculate how long it will take for this lake to be at a critical level. please help!!! 1A-8 SPANISH CROSSWORD HELP THIS IS DUE SOON 30 POINTS What official is the head of the executive branch in Arkansas? A. the Speaker of the House of Representatives B. the secretary of state C. the governor D. the president of the Senate Elaine old bicycle had tires with 12 inch diameter. Her new bicycle has tires with 16 inch diameter. What is the difference in the same conference of the tires Write a summary of the article about the rainbow flag, making sure to include only the most important information.The rainbow flag first arose in the 1970s in San Francisco, California. In that era, many LGBTQ people had adopted the pink triangle as their symbol, but the bright shape had a dark past. In the 1930s and 1940s in Nazi Germany, gay men were persecuted. They were forced to wear a pink triangle badge to identify them. In 1978, Gilbert Baker, an artist and gay rights activist, decided to design a more hopeful symbol.Baker wanted an emblem that would give people a sense of pride and belonging. Searching his surroundings, he saw something that did exactly thatthe American flag. He made up his mind to create an LGBTQ flag, and its stripes were inspired bynature! A rainbow is a range of different colors that form a harmonious whole. Baker saw it as an appropriate symbol to represent the diversity and unity of the LGBTQ community.Making the first flags was a huge job. The original design was 30 feet by 60 feet (9.1 meters by 18.3 meters). It featured eight colors: pink, red, orange, yellow, green, turquoise, blue, and purple. Baker and a team of volunteers dyed and stitched together the material themselves. The completed flags debuted in San Francisco at a parade on June 25, 1978.Baker's artistic handiwork made a big impression that day. Afterwards, he wanted his design to spread far and wide, so he put it into mass production. In 1979, the pink stripe was taken out because typical flag fabric wasn't readily available in that color. Turquoise was then removed to make an even number of stripes. The result was the six-color design most often seen today.One banner year for the rainbow flag was 1994. Twenty-five years earlier, New York City police had raided an LGBTQ club called the Stonewall Inn. That sparked an uprising which became a catalyst for the gay rights movement. Baker honored the milestone by making a flag that was a mile (1.6 kilometers) long. The one-mile wonder has been credited with popularizing the rainbow flag around the world. But in 2003, to mark the 25th anniversary of the flag's creation in 1978, Baker outdid himself once again. He made a rainbow flag that was 1.25 miles (2 kilometers) in length.Today, the rainbow flag is the most widely recognized international emblem of LGBTQ pride. Its colors are often used to show support for the community. One example was in 2015. After the Supreme Court legalized same-sex marriage throughout the United States, millions of people tinted their social media profile pictures with rainbow stripes.Gilbert Baker died in 2017, but the design he dreamed up continues to inspire people in the LGBTQ community. The rainbow flag has passed the test of timewith flying colors. a. evidence b. reasonc. argument d. claim Which of the following is one of the root causes of environmental problems?A. Rapid population growth.B. Even distribution of wealth.C. Increasingly sustainable use of resources.D. Prices reflecting environmental costs. Julio y Leticia dan sus opiniones sobre el nuevo drama que sali el viernes, Despus de la guerra. Qu le dicen a su amiga Rafa?Negativet Commands llegar pagar perder escuchar esperar irLeticia: No a ver esa pelcula. Es aburridsima.Julio: Rafa, No a Leticia. La pelcula es buena.Leticia: Ay, por favor! Espera el DVD. No por verla en el cine.Julio: Debes ir! Y no tarde, porque comienza con mucha accin.Leticia: Accin? Qu accin? Rafa, no tu tiempo.Julio: Pues, a mi me encant. No : Debes verla hoy!2 El director les dice a todos qu cosas no tienen que hacer. Usa el verbo entre parntesis para escribir lo que dice. 1. La fi lmacin tiene que terminar antes de las cuatro. (terminar) 2. La actriz principal no quiere un sndwich. (llevar) 3. No necesito ms informacin sobre el guin. (decir)3 Escrbele una nota de cuatro oraciones a un amigo(a) para decirle qu cosas no tiene que hacer en el cine. PLEASE HELP DUE TODAY NO LINKS WILL REPORT B. True or FalseDirections: Read the following statements below. Write T if the statement is Correctand F if the statement is wrong. Write your answer on your answer sheets.1. You may use the divider to substitute thumbtacks in fastening the drawing paperon the drawing board or tabletop.2. You may use the scale as a ruler.3. Line shading showing the various shades of an object by using lines.4 Medium Values represent more amount of light.5. Curve line produced from horizontal movement.Patulong po pleass Need help pleass PLS HELP WILL MARK BRAINLIEST!! TY where did the Mughals spread (mughal empire)answer quick PLS ! A chemist is using 337 milliliters of a solution of acid and water. If 13.2% of the solution is acid, howmany milliliters of acid are there? Round your answer to the nearest tenth. value of 3 to the power of -2 Write an equation that expresses the relationship. Use k as the constant of variation.x varies inversely as m. A map of Pennsylvania has a scale of inch to 25 miles. If Pittsburgh and Philadelphia are 9 inches apart on the map, how many miles apart are the two cities? Conjugate the following verb in the present progressive according to the given subject: yo (entender)1. yo estoy entender2. yo estoy entendiendo3. yo estoy entendando4. yo estar entiendo solve pls brainliest What is Filibuster