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
kkurt [141]
3 years ago
10

Implement a function named largerThanN that accepts three arguments: an array of type int, the size of the array of type int and

an int number n. The function should display all of the numbers in the array that are greater than the number n. in the main() function create an array named numbers containing 10 integers : 30,20,50,2,-1,44,3,12,90,32 Ask the user to enter a number. Call the the function largerThanN and pass the array , the size and the number that user entered.
Computers and Technology
1 answer:
levacccp [35]3 years ago
6 0

Answer:

import java.util.Scanner;

public class NewArray {

//Main Method begins here

   public static void main(String[] args) {

   int [] numbers = {30,20,50,2,-1,44,3,12,90,32}; //The given array

   Scanner in = new Scanner(System.in);

       System.out.println("enter a number");

       int n = in.nextInt(); //Receive the number from the user

       //Calling the method largerThanN

       largerThanN(numbers, numbers.length,n);

   }

//The method largerThanN begins here

   public static void largerThanN(int []intArray, int arraySize, int n){

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

           if(intArray[i] > n){

               System.out.println(intArray[i]);

           }

       }

   }

}

Explanation:

Uisng the Java prograamming language the solution is provided above.

Please see the comments within the code for detailed explanation

The key logic within the method largerThanN () is using a for loop to iterate the entire array. Within the for loop use an if statement to compare each element with the the number n entered by the user

You might be interested in
Create a class ProblemSolution with following characteristics Two private member variables name &amp; designation of string type
Romashka-Z-Leto [24]

Answer:

Please see the attachment for the solution

Explanation:

Download txt
4 0
3 years ago
Online databases allow you access to material you may not be able to find when using popular search engines like Google. Select
Anna007 [38]

Answer:

True

Explanation:

6 0
3 years ago
In the game Singularity, broken objects can be restored to their original condition by reversing time. This is an example of whi
Zolol [24]

Solution:

In the game Singularity, broken objects can be restored to their original condition by reversing time. This is an example of which time element of player adjustment.

Thus the required answer is player adjusted.

6 0
3 years ago
Read 2 more answers
-
gavmur [86]

Answer:

ur dad was born in 1991

Explanation:

so he ate my pucc

5 0
3 years ago
2. Imagine that the user at computer A wants to open a file that is on computer C's hard disk, in a peer-to-peer fashion. What p
Elis [28]

Answer:

Since there is no server in a peer-to-peer network, both computers will share resources through the network component used in linking them together such as a cable or a switch.

Explanation:

In its simplest form, a peer-to-peer (P2P) network is created when two or more computers (in this case computer A and C) are connected and share resources without going through a separate server computer. A P2P network can be an ad hoc connection—a couple of computers connected via a Universal Serial Bus to transfer files or through an Ethernet cable. A P2P network also can be a permanent infrastructure that links a half-dozen computers in a small office over copper wires using switches as a central connector. Or a P2P network can be a network on a much grander scale in which special protocols and applications set up direct relationships among users over the Internet.

Please find attached the diagram of the peer-to-peer network of the two computers, computer A and computer. We have two network connections in the diagram.

The first one was implemented using a crossover Ethernet cable to connect both computers through the RJ45 LAN port on their network interface card.

In this network configuration, that will go through the NIC card from Computer C, through the cable to the NIC on computer A and vice versa.

In the second implementation, we used a switch to connect both computers using a straight Ethernet cable.

In this connection, data will go through the NIC card in computer C, through the cable connecting Computer C to the switch, through the switch, then through the cable connecting the switch to computer A and finally through the NIC card on computer A and vice versa

4 0
3 years ago
Other questions:
  • Kai is a software engineer who started his own IT consulting firm. His friend, Catalina, is the owner of a store that sells offi
    13·2 answers
  • After reviewing the various types of network connections available, a client chooses a network connection that is considered to
    13·1 answer
  • A queueing system has four crews with three members each. The number of "servers" is:
    5·2 answers
  • Effective presentations vary the color scheme on each slide.
    7·2 answers
  • Creation of ____________will help you to study the behavior of the real system
    11·1 answer
  • Return a version of the given string, where for every star (*) in the string the star and the chars immediately to its left and
    11·1 answer
  • Suppose that a computer has three types of floating point operations: add, multiply, and divide. By performing optimizations to
    7·1 answer
  • AfcAAgrwdsgsFsefvzsdfvbjhbdjbbjbjsdndVHFadbhZJBVdb
    10·2 answers
  • Mavis is considering signing up for a hosted enterprise software solution for her small business. She recognizes that an advanta
    15·1 answer
  • Describe s computer network that you are familiar with ?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!