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
Anestetic [448]
2 years ago
8

1. Write a static method named computeOddSum that is passed an array of int's named numbers. The method must compute and return

the sum of all the values in numbers that are odd. For example, if numbers is {3, 10, 11, 2, 6, 9, 5} then the value 28 should be returned since 3 11 9 5
Computers and Technology
1 answer:
S_A_V [24]2 years ago
5 0

Answer:

The method in Java is as follows:

public static int computeOddSum(int [] myarray){

       int oddsum = 0;

       for(int i=0; i<myarray.length; i++ ) {

        if(myarray[i]%2==1) {

           oddsum+=myarray[i];

        }

     }

     return oddsum;

   }

Explanation:

This defines the static method

public static int computeOddSum(int [] myarray){

This initializes oddsum to 0

       int oddsum = 0;

This iterates through the array

       for(int i=0; i<myarray.length; i++ ) {

This checks for odd number

        if(myarray[i]%2==1) {

The odd numbers are added, here

           oddsum+=myarray[i];

        }

     }

This returns the calculated sum of odd numbers

     return oddsum;

   }

To call the method from main, use:

<em>int [] myarray = {3, 10, 11, 2, 6, 9, 5};</em>

<em>      System.out.println("Odd sum = " + computeOddSum(myarray));</em>

You might be interested in
Mary, Tim, John, and Jenn each sold three million dollars worth of product within six months. Each month one of them was awarded
photoshop1234 [79]

if its the same chart im looking at on this page, the answer is john.

5 0
3 years ago
Read 2 more answers
Members of the sales team use laptops to connect to the company network. While traveling, they connect their laptops to the inte
coldgirl [10]

Answer: Network access control (NAC)

Explanation:

The solution that should be used is the network access control. Network access control helps in keeping devices and users that are unauthorized out of ones private network.

In this case, since one will like to prevent the laptops from connecting to the network unless anti-virus software and the latest operating system patches are installed, then the network access control can be used. One can only give access to the device that it wants to give access to and prevent others from connecting.

3 0
2 years ago
What should you do if ads keep popping up on your computer when using Google Chrome?
romanna [79]
I think it’s B.. I’m pretty sure
8 0
3 years ago
To bundle links together in order to improve bandwidth availability and redundancy, what protocol is used
Daniel [21]

Answer:

Link Aggregation Control Protocol

Explanation:

Link Aggregation Control Protocol can be used to assist in the formation of port channel bundles of physical links.

Link Aggregation Control Protocol is an IEEE standard defined in IEEE 802.3ad. LACP lets devices send Link Aggregation Control Protocol Data Units (LACPDUs) to each other to establish a link aggregation connection.

8 0
2 years ago
How do big organizations take back their data to be reviewed after a disaster?
Jet001 [13]
Here a 5 step recovery plan, I have been in IT for 8 years

1. Create a disaster recovery team.

The team will be responsible for developing, implementing, and maintaining the DRP. A DRP should identify the team members, define each member’s responsibilities, and provide their contact information. The DRP should also identify who should be contacted in the event of a disaster or emergency. All employees should be informed of and understand the DRP and their responsibility if a disaster occurs.

2. Identify and assess disaster risks.

Your disaster recovery team should identify and assess the risks to your organization. This step should include items related to natural disasters, man-made emergencies, and technology related incidents. This will assist the team in identifying the recovery strategies and resources required to recover from disasters within a predetermined and acceptable timeframe.

3. Determine critical applications, documents, and resources.

The organization must evaluate its business processes to determine which are critical to the operations of the organization. The plan should focus on short-term survivability, such as generating cash flows and revenues, rather than on a long term solution of restoring the organization’s full functioning capacity. However, the organization must recognize that there are some processes that should not be delayed if possible. One example of a critical process is the processing of payroll.

4. Specify backup and off-site storage procedures.

These procedures should identify what to back up, by whom, how to perform the backup, location of backup and how frequently backups should occur. All critical applications, equipment, and documents should be backed up. Documents that you should consider backing up are the latest financial statements, tax returns, a current list of employees and their contact information, inventory records, customer and vendor listings. Critical supplies required for daily operations, such as checks and purchase orders, as well as a copy of the DRP, should be stored at an off-site location.

5. Test and maintain the DRP.

Disaster recovery planning is a continual process as risks of disasters and emergencies are always changing. It is recommended that the organization routinely test the DRP to evaluate the procedures documented in the plan for effectiveness and appropriateness. The recovery team should regularly update the DRP to accommodate for changes in business processes, technology, and evolving disaster risks.



summary :an organization must develop a recovery team to create a disaster recovery plan that includes identifying and assessing disaster risks, determining critical applications, and specifying backup procedures. Other procedures may be included in the plan based on the organization. The recovery team and organization must then implement the DRP and follow through on the plan procedures. The DRP should be continually tested and maintained to consistently prepare the organization for evolving disasters and emergencies.
4 0
2 years ago
Other questions:
  • The salesperson in a cell phone store is telling me that the phone I'm considering has 8GB of memory, which means I can save 10,
    13·1 answer
  • Compare the logical link control and the media access control. Which of the following is a correct statement?
    7·2 answers
  • Rebooting the computer is a good troubleshooting technique.<br><br> True<br> False
    6·2 answers
  • What is one of the most effective security tools available for protecting users from external threats?
    15·1 answer
  • Suppose that a is a one-dimensional array of ints with a length of at least 2. Which of the following code fragments successfull
    8·1 answer
  • How are satellite radio, Internet radio, and podcasting different?
    11·1 answer
  • Driswers.
    13·2 answers
  • This is a human-made physical system.
    15·1 answer
  • Imagine that a team of scientists test a certain hypothesis, and the experimental results show that it is false.
    6·1 answer
  • Write a code snippet Now write your own code snippet that asks the user to enter two numbers of integer type (one at a time) and
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!