Answered step by step
Verified Expert Solution
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.
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started