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
malfutka [58]
3 years ago
13

Write a method named secondHalfLetters that accepts a string as its parameter and returns an integer representing how many of le

tters in the string come from the second half of the alphabet (that is, have values of 'n' through 'z' inclusive). Compare case-insensitively, such that uppercase values of 'N' through 'Z' also count. For example, the call secondHalfLetters("ruminates") should return 5 because the 'r', 'u', 'n', 't', and 's' come from the second half of the alphabet. You may assume that every character in the string is a letter.
Computers and Technology
1 answer:
kykrilka [37]3 years ago
4 0

Answer:

The answer to this question can be given as:

Method Definition:

public static int secondHalfLetters(String letters)

{

int count = 0;

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

{

if (Character.toLowerCase(letters.charAt(i)) >= 'n')

{

count++;

}

}

return count;

}

Explanation:

In the above method definition first we declare the method that name is already given in the question that is secondHalfLetters() function. In this function we pass a string parameter that is letters.In the function we declare  an integer variable count.Then we declare the for loop. In this loop we declare the conditional statement in the if block we convert character into lowercase and check that value is greater the equal to n. If this condition is true then it count increase by 1. In the lass we return count value.

You might be interested in
Match the job roles with their appropriate qualifications
UNO [17]
Knowledge...- software QA engineer
Master’s...- business analyst
course...- network and computer admin
training...- multimedia artist
3 0
4 years ago
How do you know if the website is secure if you make a purchase
marysya [2.9K]

Look for the lock symbol in the search section of your window/browser.

4 0
3 years ago
Read 2 more answers
In the computer science industry, the process of finding and removing errors from computer hardware or software is known as
Katyanochek1 [597]
Debugging i think it is
3 0
3 years ago
Required skills,training,education for dentist
AlekseyPX

Answer:

Education-Bachelor's degree prior to admission to dental school; doctoral degree in dental medicine or dental surgery; some dental specializations require completion of a residency

Skills- Communication skills. Dentists must have excellent communication skills, Detail oriented, Dexterity, Leadership skills, Organizational skills, Patience, Physical stamina, Problem-solving skills.

Explanation:

7 0
3 years ago
Grandma Ester normally gives you hugs for your birthday - one for every year old you are. When you turned 15, she squished you w
horsena [70]

Answer:

Written in Python

age = int(input("How old are you? "))

for i in range(1,age+1):

     print("**HUG**")

Explanation:

The first line prompts the user for age

age = int(input("How old are you? "))

The next line is an iteration that starts from 1 till the user input

for i in range(1,age+1):

The last line prints "**HUG**" while the iteration is true

     print("**HUG**")

4 0
3 years ago
Other questions:
  • Jane is designing a print brochure for a retail company. She’s having trouble deciding on the page margin. Which best practice w
    13·2 answers
  • Define application pakage​
    5·2 answers
  • Who where the romanovs? What happened to them ?
    7·1 answer
  • Suppose Alice and Bob are sending packets to each other over a computer network. Suppose Trudy positions herself in the network
    8·1 answer
  • Assembling parts and using various machines to create a final product is the process of ______.
    14·1 answer
  • This uses the gps methodology to predict the likely location of an offender's base of operation:
    8·1 answer
  • Evaluate the advantages and disadvantages of cloud computing.
    12·1 answer
  • Mention how to install antivirus software in your computer, either by following the instructions given on installation CDs or we
    6·1 answer
  • How does the internet works
    14·1 answer
  • Bruce realizes he's getting a cramp in his neck after texting with his buddy for several minutes. he puts the phone down and tak
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!