Excellent. Though, you don’t need the last line in there since you build the full name in getFullName
.
Ok now you really blew my mind. So the full name is built in getFullName even if that method isn’t called?
You have only two internal variables, lastName
and firstName
. In your constructor, getFullName
, getFirstName
, and getLastName
methods you only use those two variables, so in your set*
methods you only need to update those two variables.
no, but your return statement there is return firstName + " " + lastName
you don’t need to update firsrAndLast
as you don’t use it anywhere else
2 Likes