1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
balu736 [363]
3 years ago
5

The sameNumber method checks to see if the number of words in the phrase, numwords, is the same number of words contained in the

myWords array. The method returns true of the array and phrase have the same number of words and false if they do not. Write the sameNumber method.
Computers and Technology
1 answer:
Eduardwww [97]3 years ago
6 0

Answer:

Answered below.

Explanation:

//Program is written in Kotlin programming language.

fun sameNumber(numWords: String, myWords: List<String>) : Boolean{

//Split words in phrase into list

val str: List<String> = numWords.split(" ")

//Convert to mutable list.

val phrase = str.toMutableList()

val words = myWords.toMutableList()

//Compare the number of items in each list.

if( phrase.size == words.size){

return true

}else{

return false

}

}

You might be interested in
Question 2 (2 points)
swat32

I beleive all of the above for question one

4 0
3 years ago
Which of the following are best and safe practices for shutting down a computer or disconnecting a device? Check all of the boxe
Mademuasel [1]
D and A because in order to be safe you need to unplug it to be safe
6 0
3 years ago
Read 2 more answers
When was third battle of Panipat fought​
enyata [817]

Answer:

January 14, 1761

Explanation:

6 0
3 years ago
Which is an example of an input device?
disa [49]

Answer:

Explanation:

Mouse is an example of input device

7 0
4 years ago
Read 2 more answers
If you know the unit prices of two diffferent brands of an item,you are better able to
pantera1 [17]

Answer:

Compare the prices of the two brands.

Explanation:

Price can be defined as the amount of money that is required to be paid by a buyer (customer) to a seller (producer) in order to acquire goods and services.

In sales and marketing, pricing of products is considered to be an essential element of a business firm's marketing mix because place, promotion and product largely depends on it.

One of the importance associated with the pricing of products is that, it improves the image of a business firm.

Hence, if you know the unit prices of two different brands of an item, you are better able to compare the prices of the two brands. Subsequently, the buyer would be able to easily make a decision on which brand's product to purchase.

3 0
3 years ago
Other questions:
  • What is the difference between a denial-of-service attack and a distributed denial-of-service attacks? which is potentially more
    10·1 answer
  • What qualifies as a dependent (a) 25 year old son/daughter making$5k per year living at home, (b) 21 year old friend going to sc
    10·1 answer
  • What is the output of the loop for count in range(5): print(count)?
    6·1 answer
  • g 18.6 [Contest 6 - 07/10] Reverse an array Reversing an array is a common task. One approach copies to a second array in revers
    8·1 answer
  • Why is fluency in information technology becoming increasingly important for many college majors?
    9·2 answers
  • Which principle suggests that specific single responsibility interfaces are better than one general purpose interface?
    13·1 answer
  • Which of the following is an example of a sales promotion?
    7·1 answer
  • Harry has created a Microsoft Excel workbook that he wants only certain people to be able to open. He should use
    13·1 answer
  • What is mean by computer ?where it is used?​
    6·1 answer
  • I'm doing a VHDL program in Vivado, using a zyboz7 20, which would have 2 teams, each of them with different buttons and led lig
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!