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
jonny [76]
3 years ago
5

Which one of the following is the correct code snippet for calculating the largest value in an integer array list aList?

Computers and Technology
2 answers:
vodka [1.7K]3 years ago
7 0

Answer:

Option a.  int max = aList.get(0); for (int count = 1; count < aList.size(); count++) { if (aList.get(count) > max) { max = aList.get(count); } }

is the correct code snippet.

Explanation:

Following is given the explanation for the code snippet to find largest value in an integer array list aList.

  1. From the array list aList, very first element having index 0 will be stored in the variable max (having data type int).
  2. By using for starting from count =1 to count = size of array (aList), we will compare each element of the array with first element of the array.
  3. If any of the checked element get greater from the first element, it gets replaced in the variable max and the count is increased by 1 so that the next element may be checked.
  4. When the loop will end, the variable max will have the greatest value from the array aList.

i hope it will help you!

ExtremeBDS [4]3 years ago
3 0

Answer:

dont delete this question until u can crack this code

Explanation:

    1

   1 1

   2 1

 1 2 1 1

1 1 1 2 2 1

3 1 2 2 1 1

crack this code!!!!

You might be interested in
Understanding Inner Joins
vesna_86 [32]

Answer:  customers who placed orders,  orders that are attached to customers or C E

Explanation: on edg

4 0
3 years ago
Why can't cruise control work under 25 mph?
beks73 [17]
<span>At lower speeds modulating speeds is a must for safety. I would be hard pressed to find a place in town you could drive 25 mph for an extended time. Also, plan on a lot of shifting at lower speeds. That completely negates using the cruise on a manual and really puts the auto in the hunting mode. I would think it safer that you move the selector into a lower gear to get some engine braking at say, 25 mph which would make it easier to sustain the speed rather then use the cruise.

Brainliest please?</span>
4 0
3 years ago
In this lab, you complete a prewritten C++ program that calculates an employee’s productivity bonus and prints the employee’s na
Bas_tet [7]

Answer:

The answer to this question is given below in the explanation section

Explanation:

    The formula for productivity socre is      

 productivity score = ((transaction dollar value/no of transaction)/no of shift)

Productivity Score Bonus  is:  

<=30 $50

31–69 $75

70–199 $100

>= 200 $200

........................................................................................................................................

the code is given below

........................................................................................................................................

#include <iostream>

using namespace std;

int main()

{

   string firstName;

   string lastName;

   int noOfShift;

   int noOfTransaction;

   int transactionDollarValue;

   int productivityScore;

   int bonus;

   

   cout<<"Employee’s first name: ";

   cin>>firstName;

   cout<<"Employee's last name: ";

   cin>>lastName;

   cout<<"Number of shifts:";

   cin>>noOfShift;

   cout<<" Number of transactions: ";

   cin>>noOfTransaction;

   cout<<"Transaction dollar value:";

   cin>>transactionDollarValue;

   productivityScore = (transactionDollarValue/noOfTransaction)/noOfShift;

   

   if (productivityScore <= 30)

   {

       bonus =50;

       cout<<"Employee’s first name: "<<firstName<<" "<<lastName;

       cout<<endl;

       cout<<"Employee Bonuse: $"<<bonus;

       cout<<endl;

   }

   

   else if (productivityScore >= 79 && productivityScore <=199)

   

   {

       bonus =100;

       cout<<"Employee’s first name: "<<firstName<<" "<<lastName;

       cout<<"Employee Bonuse: $"<<bonus;

   }

   

   else if (productivityScore >= 200)

   

   {

       bonus =200;

       cout<<"Employee’s first name: "<<firstName<<" "<<lastName;

       cout<<"Employee Bonuse: $"<<bonus;

   }

   

   return 0;

}

               

       

6 0
3 years ago
Angular when to use reactiveformsmodule.
WITCHER [35]

Answer:

Image result for Angular when to use reactiveformsmodule.

In summaries, if forms are very important for your app, or reactive pattern are used in your app, you should use reactive forms. Otherwise your app have basic and simple requirement for forms such as sign in, you should use template-driven forms

Explanation:

Each form has a state that can be updated by many different interactions and its up to the application developer to manage that state and prevent it from getting corrupted. This can get hard to do for very large forms and can introduce a category of potential bugs

3 0
2 years ago
To test dns configuration by resolving a host name to ip address, which command or commands can you use
Helga [31]

ping, tracert or nslookup can all be used.

4 0
2 years ago
Other questions:
  • _____ create computer programs by using their knowledge of computer science, math, and other disciplines.
    11·1 answer
  • Which two keys on the keyboard allow an access user to move the insertion point to the next field to the right in datasheet view
    11·1 answer
  • Which of the following can potentially be changed when implementing an interface?
    13·1 answer
  • Implement a program to measure the impact of application-level buffer sizes on read time. This involves writing to and reading f
    13·1 answer
  • Create a java class for Bank Accounts with these public String attributes: ownerName, acctNbr and these private double attribute
    11·1 answer
  • A​ _______ helps us understand the nature of the distribution of a data set.
    10·1 answer
  • You work in the Accounting Department and have been using a network drive to post Excel workbook files to your file server as yo
    9·1 answer
  • Where is NumPy used?
    6·2 answers
  • The function below takes one parameter: a list of strings (string_list). Complete the function to return a new list containing o
    13·1 answer
  • // This pseudocode segment is intended to compute the number
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!