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
weqwewe [10]
4 years ago
7

Project 4: Strictly Identical arrays

Computers and Technology
1 answer:
geniusboy [140]4 years ago
3 0

Answer:

import java.util.Scanner;

public class StrictlyIdentical

{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int[] list1 = new int[5];

 int[] list2 = new int[5];

 System.out.println("Enter the numbers for list1: ");

 for (int i=0; i<5; i++) {

        list1[i] = input.nextInt();

    }

    System.out.println("Enter the numbers for list2: ");

    for (int i=0; i<5; i++) {

        list2[i] = input.nextInt();

    }

 

 if (equals(list1, list2))

     System.out.println("the lists are strictly identical.");

 else

     System.out.println("the two lists are not strictly identical.");

}

public static boolean equals(int[] array1, int[] array2) {

    boolean isIdentical = true;

    for (int i=0; i<5; i++) {

        if (array1[i] != array2[i])

            isIdentical = false;

    }

    return isIdentical;

}

}

Explanation:

Create a function called equals that takes two parameters, array1, and array2

Initialize the isIdentical as true, this will be our control variable to change its value if two arrays are not identical

Create a for loop that iterates through the arrays. If corresponding elements of the arrays are not equal, set isIdentical as false.

When the loop is done, return the isIdentical

Inside the main:

Declare two arrays

Ask the user to enter numbers for the arrays using for loop

Check if two arrays are identical using the <em>equal</em> function. Print the appropriate message

You might be interested in
A company is deploying a file-sharing protocol across a network and needs to select a protocol for authenticating clients. Manag
VARVARA [1.3K]

Answer:

The answer is "Option C".

Explanation:

Among all four of the above, the application of Kerberos is securer. The consumer not just to validates the provider but also verifies the product to the clients with secure authentication.  

  • It offers a common interface between windows as well as other operating systems.  
  • The user login Smart Card gives much higher protection as it allows security with two factors, that's why except Option C other choices were wrong.
6 0
3 years ago
Whats is a better game?
Jobisdone [24]

Answer:

The first two are the best ones I see here, because I play them. Not sure how else to say that. Please make sure to also use brainly for school, though. Thanks!

3 0
2 years ago
Xcvasdfgfdsasdfghjhgf
Cerrena [4.2K]

Well, The answer would be zxnisdnkfnxkzl since ndlsfd;gjfsdd is a forsfgfd operation. Also, the ffsldflslc is like the dfgfd. Keep that in mind when you are studying the ffsldflslc. It could be tough on the test.

3 0
3 years ago
What is the term that is used to describe a computer system that could store literary documents, link them according to logical
madreJ [45]

Answer:

hypertext

Explanation:

Based on the information provided within the question it can be said that the type of computer system function being described is known as hypertext. This displays text to the computer display that references other literary documents for immediate access to them. These are documents with a specific relation to the text that is being displayed and also allows readers to comment and annotate what they read on the documents.

5 0
3 years ago
A(n) ____ allows others besides the manufacturer to develop software to run on the system or device.
RideAnS [48]

Answer:

Application Programming Interface.

Explanation:

Application Programming Interface(API) is a collection of function, routines, procedures and the protocol which are used create a software application.The main role of API is that it defined or specified how the components of software will interact.

The objective of the Application Programming Interface that it the manufacturer or develop software that is running on system or device. The advantage of using the Application Programming Interface is that we can develop a better program in a very manner by using the API.

5 0
4 years ago
Other questions:
  • Does a soda vending machine Give reciepts?<br><br>need for computer science hw
    7·2 answers
  • True or False
    13·1 answer
  • Peter was working on a design for a magazine. He had to give his design to his team for further editing. He wanted to use a file
    8·1 answer
  • Your company has purchased another company that also uses Windows Server 2016 and Active Directory. Both companies need to be ab
    11·1 answer
  • Love me love me say that u love me fool me fool me go on and fool me : ) answer the question thx
    6·2 answers
  • PLEASE HELP THIS IS DUE TODAY!! WILL MARK BRAINLIEST!!
    13·2 answers
  • What do you think color theory<br> in web design is?
    14·1 answer
  • Name the contributory components that are considered when determining an E/M code; they are not considered key components:
    15·1 answer
  • (Correct Answer Recieves Brainliest)
    8·2 answers
  • A.m. client appears at the top of every page
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!