Write a method named lastFirst that accepts a string as its parameter representing a person's first and last name. The method should 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.

Answers

Answer 1
Answer:

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) );

       

   }

   

}


Related Questions

Which tools would you use to make header 1 look like header 2.
The software program you need to have to read PDF file, such as the PDF files you download from your My Courses page, isa. Adobe Reader. b. Shock Wave. c. Applet. d. Flash.
James would like to send a document he has saved on the hard drive to coworkers and Ireland Brazil and India. These coworkers have Internet access. He should
cell phone sms messages are an example of .a. user-generated mass media.b. analog media.c. personal media.d. affordance media.
Virtual offices that give everyone on a team access to the same set of resources and information are called

To add a new guide to the slide press ____________________ and then drag an existing guide

Answers

To be able to add new guide to the slide, press [Ctrl] and then drag an existing guide. Make sure that the guide is visible to your power point first so you can be able to do this. Guides in the power point is consist of 2 lines, the horizontal line and the vertical lines, once this set to appear, it will be visible to all your slides. 

How can i take a virus off a computer without taking it to be fixed ??

Answers

scan your computer with a virus scanner then get rid of the viruses from your scanner it will say how many viruses you have and ask you to remove them

Which 10 gigabit standard uses mmf cabling for distances up to 300 meters and is often used for sonet campus networks?

Answers

I guess the correct answer is 10GBase-SW

10GBASЕ-SW mеdia typеs arе dеsignеd fοr usе οvеr shοrt wavеlеngth (850 nm) multimοdе fibеr (MMF). Thе dеsign gοal οf thеsе mеdia typеs is frοm 2 mеtеrs tο 300 mеtеrs οf fibеr distancе, dеpеnding οn thе typе and quality οf thе multimοdе fibеr. Lοngеr distancеs arе pοssiblе dеpеnding οn thе qualitiеs οf thе fibеr οptic cablе usеd. Thе 10GBASЕ-SW mеdia typе is dеsignеd tο cοnnеct tο SΟNЕT еquipmеnt, which is typically usеd tο prοvidе lοng distancе data cοmmunicatiοns.

ICD-10-CM diagnosis codes are entered in Block 21 of the CMS-1500 claim. A maximum of __________ ICD-10- CM codes may be entered on a single claim

Answers

Answer:

The answer to this question is 12.

Explanation:

You can enter a maximum of 12 ICD-10-CM codes on a single claim.Since we know that the codes entered in CMS-1500 claim are in the block of 21 in ICD-10-CM diagnosis.This should be kept in mind always in medical insurance.

So we conclude that the answer to this question is 12.

If the experiment data does not support the hypothesis what would a scientist do next

Answers

Record their results. Test the experiment again. If it sill doesn't have the same results as the experiment says a real scientist then they will announce their finding to the board of scientists. Then more scientists will test both experiments and try to get the results as one of these experiments. This cycle will continue until the experiment is proven true. 

Answer:

a qustion thier ability to be a scientist

Which are *four* best practices used in the access layer? a. Disable trunking in host ports. b. Limit VLANS to one closet. c. Use PVST+ as the STP with multilayer switches. d. Enable trunking on host ports. e. Use VLAN spanning to speed convergence of STP. f. Use VTP Server mode in hierarchical networks. g. Use VTP Transparent mode in hierarchical networks. h. Use RPVST+ as the STP with multilayer switches.

Answers

Answer:

According to the web search results, some of the best practices used in the access layer are:

Disable trunking in host ports12. This prevents unauthorized users from accessing other VLANs by configuring their NIC to use a different VLAN ID.

Use VTP Transparent mode in hierarchical networks2. This allows the access layer switches to pass VTP messages without modifying them, and avoids the risk of VTP configuration errors that could affect the entire network.

Use RPVST+ as the STP with multilayer switches2. This provides faster convergence and load balancing for VLANs, as each VLAN can have a different root bridge and spanning tree topology.

Use VLAN spanning to speed convergence of STP2. This allows multiple access layer switches to share a common bridge ID and port priority, and reduces the number of STP instances that need to be calculated.

These are some of the possible answers, but there may be other valid ones depending on the network design and requirements.

Explanation:

Final answer:

The four best practices for access layer include disabling trunking in host ports, limiting VLANs to one closet, using VTP Server mode and VTP Transparent mode in hierarchical networks. They help in improving network security, efficiency, and management.

Explanation:

The four best practices in the access layer according to the options given are as follows: 'Disable trunking in host ports', 'Limit VLANS to one closet', 'Use VTP Server mode in hierarchical networks', and 'Use VTP Transparent mode in hierarchical networks'.

Disabling trunking in host ports is a security measure that restricts the switching of traffic between VLANs. Limiting VLANs to one closet ensures consistency of connectivity and enhances network performance. VTP Server mode is used to propagate VLAN information in a hierarchical network, improving management efficiency. Finally, VTP Transparent mode is used in hierarchical networks for devices that do not participate in VTP but still forwards VTP advertisements. They form part of the best practices for access layer design and help in achieving network stability, efficiency and security.

Learn more about Access Layer Best Practices here:

brainly.com/question/35910029

#SPJ11