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
maksim [4K]
3 years ago
8

Write an application that uses String method region-Matches to compare two stringsinput by the user. The application should inpu

t the number of characters to be compared andthe starting index of the comparison. The application should state whether the comparedcharacters are equal. Ignore the case of the characters when performing the comparison.
Computers and Technology
1 answer:
SOVA2 [1]3 years ago
3 0

Answer:

Explanation:

The following program creates a function called region_Matches that takes in two strings as arguments as well as an int for starting point and an int for amount of characters to compare. Then it compares those characters in each of the words. If they match (ignoring case) then the function outputs True, else it ouputs False. The test cases compare the words "moving" and "loving", the first test case compares the words starting at point 0 which outputs false because m and l are different. Test case 2 ouputs True since it starts at point 1 which is o and o.

class Brainly {

   public static void main(String[] args) {

       String word1 = "moving";

       String word2 = "loving";

       boolean result = region_Matches(word1, word2, 0, 4);

       boolean result2 = region_Matches(word1, word2, 1, 4);

       System.out.println(result);

       System.out.println(result2);

   }

   public static boolean region_Matches(String word1, String word2, int start, int numberOfChars) {

       boolean same = true;

       for (int x = 0; x < numberOfChars; x++) {

           if (Character.toLowerCase(word1.charAt(start + x)) == Character.toLowerCase(word2.charAt(start + x))) {

               continue;

           } else {

               same = false;

               break;

           }

       }

       return same;

   }

}

You might be interested in
How does a MIPS Assembly procedure return to the caller? (you only need to write a single .text instruction).
AnnyKZ [126]

Answer:

A MIPS Assembly procedure return to the caller by having the caller pass an output pointer (to an already-allocated array).

8 0
3 years ago
Please help <br> what do data communications transmit data through?
I am Lyosha [343]

Answer:There are two methods used to transmit data between digital devices: serial transmission and parallel transmission. Serial data transmission sends data bits one after another over a single channel. Parallel data transmission sends multiple data bits at the same time over multiple channels.

Explanation:

5 0
3 years ago
Select ALL of the statements that are true:
Sati [7]

Answer:

a. Datums can be established through trigonometric leveling.

d. Geoid models have improved through time.

e. NGVD29 was matched to more tidal stations than NAVD88

Explanation:

a. Datums can be established leveling with trigonometric form, is a method to determinate different elevations.

d. Geoid models have been improved through time in the gravimetric geoid model and increase accuracy, actually, these models keep refining, there were errors ins this models, nowadays are more accurate.

e. NGVD29 was matched by tidal stations more than NAVD88.

NGVD29 was established by 26 tidal gauges in United Stated and Canada, maps were prepared, but NGVD29 was replaced because is less accurate than NAVD88.

NAVD88 were not used Additional tidal.

False sentence

b. The average sea level doesn't correspond to our current vertical data, this depends on our location.

For example

Rinconada in Peru is the highest human establishment in the world to 5100 m.

Everest is the highest summit in the world to 8848 m.

This marker indicating the sea level is located in Jerusalem.

c. Often is used levels, but there are other methods like set-up, bench mark.

f. the Dynamic heights are not the same as orthometric heights, because the dynamic heights are perfect, but the orthometric heights can change slightly, in a few words are imperfect heights.

6 0
3 years ago
To insert a new field in a table, the ____ keyword should be used with the alter table command
fenix001 [56]
It seems that you have missed the necessary options for us to answer this question so I had to look for it. Anyway here is the answer. To insert a new field in a table, the ADD <span>keyword should be used with the alter table command. Hope this answers your question.</span>
5 0
3 years ago
__________ filtering requires that the filtering rules governing how the firewall decides which packets are allowed and which ar
DIA [1.3K]

Answer:

Static

Explanation:

A computer or system administrator who want packets to be filter have to set or configured a filtering rules which will enable and allow the firewall to decide on which of the packets that will be allowed to function and the packets that will be denied not to function to be developed and as well installed on the firewall have to make use of what is called STATIC FILTERING reason been that STATIC FILTERING make it of necessary that the filtering rules should be developed and installed with the firewall.

6 0
3 years ago
Other questions:
  • Jim wants to develop an app for a specific purpose that would run even when his computer is not connected to the Internet. What
    11·1 answer
  • 20 points/ When creating a storyboard, in which section do you mention how you move from one shot to the next?
    11·1 answer
  • An expression that can’t be reduced any further is:
    5·2 answers
  • Given the availability of an ofstream object named output, write the other statements necessary to write the string "3.14159" in
    8·1 answer
  • Similarities between drawing toolbar and editing toolbar​
    12·2 answers
  • Write down the bit pattern in the fraction of value 1/3 assuming a floating point format that uses Binary Coded Decimal (base 10
    10·1 answer
  • Hi! This is python coding. Please don't take advantage, actually, answer!
    11·1 answer
  • What are Manuscript signs​
    8·1 answer
  • 2. Which pattern microphone should Jennifer take to the press conference? Jennifer is a journalist with one of the leading newsp
    14·1 answer
  • What is the difference between RELIABLE and UNRELIABLE sources of<br> income?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!