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
Ket [755]
3 years ago
10

Write a method named removeRange that accepts an ArrayList of integers and two integer values min and max as parameters and remo

ves all elements values in the range min through max (inclusive). For example, if an ArrayList named list stores [7, 9, 4, 2, 7, 7, 5, 3, 5, 1, 7, 8, 6, 7], the call of removeRange(list, 5, 7); should change the list to store [9, 4, 2, 3, 1, 8
Computers and Technology
1 answer:
telo118 [61]3 years ago
5 0

Answer:

Answered below

Explanation:

public ArrayList<Integer> removeRange(ArrayList<Integer> X, int min, int max){

int i; int j;

//Variable to hold new list without elements in //given range.

ArrayList<Integer> newList = new ArrayList<Integer>();

//Nested loops to compare list elements to //range elements.

if(max >= min){

for( i = 0; i < x.length; I++){

for(j = min; j <= max; j++){

if( x [i] != j){

newList.add( x[i] );

}

}

}

return newList;

}

}

You might be interested in
Which following is one of the basic characters of object-oriented systems : Select one: a. process b. data c. module d. inherita
Leviafan [203]
The answer is D.

Inheritance means that a child class (subclass) can inherit functionality from a parent class (superclass). For example, a class called Person could have 2 subclasses called Student and Teacher. While Student and Teacher have attributes and methods that differ, they also have some that overlap. By passing these overlapping functionalities down from the Person class, we are making the code more reusable. This eliminates the need to write duplicate code and makes the code more readable.

7 0
4 years ago
You have been asked to advise a group of several universities who want to combine research efforts and store data in the cloud.
inn [45]

Community cloud is best for a group of several universities who want to combine research efforts and store data in the cloud.

<h3>Community cloud</h3>

Community cloud allows for the flexibility and scalability normally found in a public cloud, but it also limits the number of users to a smaller, trusted group.

  • When multiple organizations with similar objectives want to combine efforts in a cloud, the best choice is generally a community cloud.

Community cloud is best for a group of several universities who want to combine research efforts and store data in the cloud.

Find out more on community cloud at: brainly.com/question/25620318

4 0
3 years ago
Your first submission for the CIS 210 Course Project should include the following functionality: - Requests the user to input hi
Viefleur [7K]

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 String name;

 System.out.print("First name: ");

 name = input.next();

 name= name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();

 System.out.print(name);

}

}

Explanation:

This declares name as string

 String name;

This prompts the user for first name

 System.out.print("First name: ");

This gets the name from the user

 name = input.next();

This capitalizes the first letter of name and makes the other letters to be in lowercase

 name= name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();

This prints the formatted name

 System.out.print(name);

5 0
3 years ago
Imagine that you are a professional white hat hacker, testing a company’s system to make sure they are ready for attacks. What m
liberstina [14]

Answer:

A white hat hacker, or ethical hacker, uses penetration testing techniques to test an organization's information technology

Explanation:

3 0
2 years ago
Write a program to input a number and check whether it is even or odd number
Mashutka [201]

Answer:#include <stdio.h>

int main() {

   int num;

   printf("Enter an integer: ");

   scanf("%d", &num);

   // true if num is perfectly divisible by 2

   if(num % 2 == 0)

       printf("%d is even.", num);

   else

       printf("%d is odd.", num);

   

   return 0;

}

3 0
3 years ago
Other questions:
  • In three to five sentences, describe how you can organize written information logically and sequentially
    8·1 answer
  • Why is it important to verify a customer complaint?
    6·1 answer
  • Traffic that is encrypted will typically pass by an intrusion prevention system untouched.a. Trueb. False
    10·1 answer
  • The breastbone or ________________ extends down the chest.
    5·1 answer
  • 2:3:5<br>_ _ _<br>3 2 8<br><br><br><br>find ratio​
    5·1 answer
  • What is a third variable condition that could create the following correlation?
    10·2 answers
  • Will mark brainliest! What does this code do? What kind of code is this called?
    15·1 answer
  • Which of the following statement is correct? Select one: a. Base register holds the size of a process. b. Limit register holds t
    10·1 answer
  • After Alexandra installed new software, she set it up to perform in a certain way. She is _____. changing the peripherals linkin
    10·1 answer
  • Which of the following is classified as a workgroup information system?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!