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
poizon [28]
3 years ago
10

Consider the following method: public static void arrayMystery(int[] array) { for (int i = 0; i < array.length - 1; i++) { if

(array[i] < array[i + 1]) { array[i] = array[i + 1]; } } } Indicate what values would be stored in the array after the method arrayMystery executes if each integer array below is passed as a parameter to it. a. input = {2, 4} b. input = {1, 3, 6} c. input = {7, 2, 8, 4} d. input = {5, 2, 7, 2, 4} e. input = {2, 4, 6, 3, 7, 9}
Computers and Technology
1 answer:
Leya [2.2K]3 years ago
3 0

Answer:

a. input={4,4}

b. input={3,6,6}

c. input={7,8,8,4}

d. input={5,7,7,4,4}

e input={4,6,6,7,9,9}

Explanation:

First understanding the method in the method we are iterating over array upto the second last element and in the loop we are checking that the current element is less than then next array element if it is less then we are assigning the value of next element to the current element.So the outputs are stated above according to the method execution.

You might be interested in
Select the correct answer. Vlad wants to include his goals and target in his résumé. He also wants to add how he can be benefici
Alla [95]

Answer:

Goals and targets in A

how he can be beneficial to the company in cover letter

Explanation:

While writing a resume goals and targets are added to objectives section.Which briefly describes your goals and gives a hint on your overall motives to join an organizations.While to add other information like how can you be beneficial for company a cover letter is attached with resume which contains information like why you are best fit for the job and  how can you be beneficial for this job.

Cover letter makes great first impressions and sometimes basic screening is done on the basis of cover letters.

6 0
3 years ago
Implement a program called genes.py that does the following: a. Reads a DNA sequence t as command-line argument b. Reads strings
Fantom [35]

Answer:

Following are the code to this question:

import sys#import package sys

class Gene:#defining a class Gene

   gString = ""#defining a string variable

   def __init__(self, gString):#defining a constructor

       self.gString = gString#defining object to hold string value

gCount = 0#defining integer variable

mCount = 0#defining integer variable

t = input();#input value from user end

for s in sys.stdin:#defining for loop to check input value

   g = Gene(s)#defining g variable to pass value in class parameter

   gCount +=1#incrementing the value of gCount variable

   if(t in s):#defining if block to check input

       mCount +=1#incrementing the matchCount value

       print( g.gString,"True")#print value True

   else:#else block

       print( g.gString,"False")#print value False

   print("{:.2f}".format(mCount*100/gCount))#print percentage value

Output:

Please find attachment file.

Explanation:

In the code, a class Gene is declared, that defines a string variable geneString, and creates its constructor, and store the string variable value.

In the next step, a three-variable gCount, mCount, and t defined, in which variable "t" is used for an input value, and inside the for loop, it uses the conditional statement, that checks its value and increments the integer value, and print true or false as a message.

5 0
2 years ago
Defeating authentication follows the method–opportunity–motive paradigm.
sashaice [31]

Answer:

Method:- This is related to hackers technique and way of accessing to copy other data. It also includes the skill, knowledge, tools and other things with which to be able to pull off the attack.

Opportunity:- this is related to how a user gives way to access to the hackers. It includes the time, the chance, and access to accomplish the attack.

Motive:- This may relate to the hacker to destroy the reputation of another or for money. It is reason to want to perform this attack against this system

3 0
2 years ago
Do you guys know if there's a way for me to find a Google doc that I typed but forgot to save if you do it for points i will rep
ValentinkaMS [17]

Answer:

Usually, Google Docs save automatically. If you remember some keywords that you typed, try searching for it. For example, if you typed up a report about dogs, search "dogs" when you're on the Google Docs home screen.

Explanation:

If this doesn't help, leave a comment and I'll try to help more!

4 0
3 years ago
Read 2 more answers
Noi needs to send some documents to a client in another company. Which device can she use to make digital copies of the paper fi
soldier1979 [14.2K]
D scanner She can scan the files and email a digital copy.
4 0
2 years ago
Read 2 more answers
Other questions:
  • Define the missing function. licenseNum is created as: (100000 * customID) + licenseYear. Sample output:
    10·2 answers
  • 1- Which of the following is the java keyword used to declare a class?
    5·2 answers
  • You are a developer for a company that is planning on using the AWS RDS service. Your Database administrator spins up a new MySQ
    7·1 answer
  • Compared to a virtual image, a real image
    15·2 answers
  • For a typical middle-income family, what is the estimated cost of raising a child to the age of 18?
    11·1 answer
  • URGENT!!! Which file format is used mainly in the Microsoft Windows operating system?
    15·2 answers
  • Lesson 3 - Calling All Operators
    6·1 answer
  • Are there any apps in the App Store that allow people to ask a question about any topic and have skilled professionals answer it
    6·1 answer
  • A multinational organization that offers web-based services has datacenters that are located only in the United State; however,
    6·1 answer
  • Write a short note on Ms - Excel...​..
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!