Question: public abstract class Person { private String firstname; private String lastname; public Person ( String first, String last ) { firstname = first; lastname =

public abstract class Person {
private String firstname;
private String lastname;
public Person (String first, String last)
{
firstname = first;
lastname = last;
}
// getters for firstName and lastName
public String getFirstName ()
{
return firstname;
}
public String getLastName ()
{
return lastName;
}
public abstract String fullName();
}
**AND**
public class PersonName extends Person
{
public PersonName (String first, String last)
{
super (first, last);
}
// missing code
}
What is the code for the proper "//missng code"?
a. public String FullName (String first, String last)
{
return first +""+ last;
}
b. public String FullName()
{
return firstName +""+ lastname;
}
c. public String fullName (Person p)
{
return p.firstName +""+ p.lastName;
}
d. public String fullName ()
{
return getFirstName ()+""+ getLastName();
}
e. public abstract void fullname()
{
return firstName +""+ lastName;
}
A) Choice a
B) Choice b
C) Choice c
D) Choice d
E) Choice e

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!