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
Fittoniya [83]
3 years ago
6

9.17 LAB: Acronyms An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose input is

a phrase and whose output is an acronym of the input. If a word begins with a lower case letter, don't include that letter in the acronym. Assume there will be at least one upper case letter in the input.
Computers and Technology
1 answer:
AlexFokin [52]3 years ago
6 0

Answer:

Hence the code is given as follows,

import java.util.Scanner;

public class LabProgram {

   public static String createAcronym(String userPhrase){

       String result = "";

       String splits[] = userPhrase.split(" ");

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

           if(splits[i].charAt(0)>='A' && splits[i].charAt(0)<='Z')

               result += splits[i].charAt(0);

       }

       return result;

   }

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       String s = scan.nextLine();

       System.out.println(createAcronym(s));

   }

}

You might be interested in
Maria found a cupcake recipe on a cooking blog. However, she would like to read comments and suggestions before she begins bakin
Mnenie [13.5K]
Maria should use the Cooking blog that has known and verified information and step by step instructions Comments can lead to disaster and/or incorrect recipe use
8 0
4 years ago
Read 2 more answers
In object oriented programming, what is another name for the "attributes" of an object?
Ket [755]
I believe the word you're looking for is properties.
7 0
3 years ago
Match the components of a blog to their descriptions.
motikmotik

Answer:

Explanation:

1. entry title - name of the posting

2. permalink - place where a blog posting is located

3. entry date - when the posting became available

4. comment - allows users to add to the conversation

3 0
3 years ago
Modify the FitnessTracker class, created in Chapter 4 Programming Exercise 3AB, so that the default constructor calls the three-
Ivenika [448]

Answer:

Is this coding?

Explanation:

5 0
3 years ago
Suppose the inventory is unordered (!) and a sequential search is done to locate a specific artifact. Given that the search is e
lana [24]

Answer:

The computer can do 12000 searches per second. Suppose there are 60000 inventory items. And we need to search one item from it in a sequential manner. The computer can do 12000 searches in one second. Hence it can search in a list of 60000 inventory in 5 seconds, as 12000 x 5 =60000 searches, in the worst case. And if the item is below 12000 on the list, it will take less than 1 second(1/12000 sec in best case), and so on.

And if we assume that the list is sorted, and perform a binary search. then in the worst case, the number of searches required in the worst case will be 60000/2= 30000. And the time required will be 30000/12000= 5/2=2.5 seconds, and (1/24000) seconds in the best case. Its 1/24000 as its binary search.

Explanation:

Please check the answer section.

6 0
3 years ago
Other questions:
  • If people have humility, they don’t tend to see themselves as overly or more important than others. True False
    13·1 answer
  • Write a note on secondary storage​
    14·1 answer
  • Someone please help me with the right answer please
    13·1 answer
  • Unless you explicitly initialize global variables, they are automatically initialized to
    5·1 answer
  • Should the federal government have bug bounty programs? Why or why not?
    9·2 answers
  • Which platform is the best? (X-box, PC, Playstation, Nintendo Switch, Wii)
    10·1 answer
  • How do you code a website?
    10·1 answer
  • Kareem is working on a project for his manager. He has a few questions for a co-worker who he knows is knowledgeable on the subj
    7·1 answer
  • Why is the term RAW image file generally used to describe a variety of file formats, which are sometimes known as digital raw ca
    13·1 answer
  • Database policies should be created and implemented by all organizations, regardless of the ________ of the organization.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!