Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use the code provided in JAVA and use runner file to output answers. A+ Computer Science STRING NAME Lab Goal : This lab was

Please use the code provided in JAVA and use runner file to output answers.

image text in transcribedimage text in transcribedimage text in transcribed

A+ Computer Science STRING NAME Lab Goal : This lab was designed to teach you more about objects and the String class. Lab Description : Write a program that will store a complete first and last name. The program will also return the first and last names as independent words. Sample Data : Sally Baker John Doe Sammy Lammy Benny Programmer Sandy Painter Files Needed :: Name.java NameRunner.java Sample Output : Sally Baker Sally Baker John Doe John Doe Sammy Lammy Sammy Lammy Runner File import static java.lang.System.*; public class NameRunner { public static void main(String[] args) Name person = new Name ("Sally Baker"); System.out.println (person.getFirst(); System.out.println (person:getLast()); System.out.printin (person); PersonetName("John Doe"); System.out.printin (person.getFirst()); System.out.println (person:getLast()); System.out.printin (person); person.setName ("Sammy Lammy"); System.out.println (person.getFirst()); System.out.printin (person.getLast()); System.out.println (person); WOWANAM www } } } CODE TO COMPLETE import static java.lang. System public public class Name { private String name; public Name () { } 1 public Name (String 3) } public void setName_String 3) { } public String getFirst !) { return ""; } public String as stated) { return; } public String tastring) return ""; } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

Communicating Organizational Culture

Answered: 1 week ago