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
Illusion [34]
3 years ago
13

Write a method named lastFirst that accepts a string as its parameter representing a person's first and last name. The method sh

ould return the person's last name followed by the first initial and a period. For example, the call lastFirst("Marla Singer") should return "Singer, M." . You may assume that the string passed consists of exactly two words separated by a single space.
Computers and Technology
1 answer:
Usimov [2.4K]3 years ago
7 0

I'm going to assume this is Java, because you said "method" meaning it will be some sort of object oriented language, and Java's really common. Here would be the full program, but you can just take the method out isolated if you need it.

package lastname;

public class LastName {

   public static void main(String[] args) {

       // Example usage:

       String name = LastName.lastName("Garrett Acord");

       System.out.println(name);

       // Output: Acord G.

   }

   public static String lastName(String fullName)

   {

       String[] splitName = fullName.split(" ");

       return String.format("%s %s.", splitName[1], splitName[0].substring(0,1) );

       

   }

   

}

You might be interested in
Which method is useful for dimensionality reduction especially for small data-sets?
Anna [14]
Independent Component Analysis (ICA) is based on information-theory and is also one of the most widely used dimensionality reduction techniques.
8 0
2 years ago
How do i convert videos on the computer
mr Goodwill [35]

Answer:

An online tool or software.

Explanation:

Video conversion can be done using an online tool and software. If you choose to convert your videos by using an online tool, open any online tool and paste the link of the video or upload a video file from your computer, select the format you want and then click convert. Conversion takes a few seconds, and once the conversion is done, you can download the audio file. And if you choose to convert your videos by using the software, you have to download software, install it in your personal computer, and use it for conversion. In this process of transformation, you have to upload a video file from your computer. And if you do not need the output file format, some software can choose the setup automatically.

5 0
3 years ago
Which of the following is not one of the goals of technical recovery team members during the recovery phase of a BCP? Normalize
Zanzabum

Answer:

Repair damage done to original systems

Explanation:

It is imperative that businesses brace up for moments or period of challenges whereby normal operation is impeded due to disruption in standard system condition. The ability of businesses to thrive and continue to deliver in these circumstances is catered for by the business continuity plan. The recovery team ensures that important processes critical to the business are restored in other to ensure that business operation isn't crippled. Once normalcy ahs been restored, the team ensures recoverabke day in the original system are taken care of. The repair of damage done is not a goal of the recovery ohase in the business continuity plan as repairsvare catered for after recovery event has been finalized.

3 0
3 years ago
1. Data in a smart card can be erased
Ostrovityanka [42]

Answer:

false

true

false

true

true

5 0
3 years ago
Read 2 more answers
Give reasons why local efforts are required to conserve biodiversity​
mario62 [17]
The most obvious reason for conservation is to protect wildlife and promote biodiversity. Protecting wildlife and preserving it for future generations also means that the animals we love don't become a distant memory. And we can maintain a healthy and functional ecosystem.
3 0
2 years ago
Other questions:
  • Write the execution steps if the input is a lion.
    11·1 answer
  • Who does Potholes effect in South Africa?
    15·1 answer
  • Write the definition of a function typing_speed, that receives two parameters. The first is the number of words that a person ha
    9·1 answer
  • Which of these files when included in a program will provide user assistance?
    13·2 answers
  • The Internet and World Wide Web allow almost any business to be global. What are two important results of this process?
    8·1 answer
  • What is a digital certificate? Select one: a. It is a means of establishing the validity of an offer from a person, entity, web
    7·1 answer
  • A lottery ticket contains five unique numbers. A set of unique numbers does not contain repeated elements. The winning combinati
    10·1 answer
  • Explain briefly why every person in the world is not connected to the Internet.
    9·1 answer
  • Which of these is a major mobile game developer?
    9·1 answer
  • Can geico save me 15% or more on car insurance?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!