01: package com.uvw.travel.impl;
02:
03: import com.uvw.travel.Name;
04:
05: /**
06: * @author Adrian Price
07: */
08: public class NameImpl implements Name {
09: private final String firstName;
10: private final Character middleInitial;
11: private final String lastName;
12: private final String fullName;
13:
14: public NameImpl(String firstName, Character middleInitial,
15: String lastName) {
16: this .firstName = firstName;
17: this .middleInitial = middleInitial;
18: this .lastName = lastName;
19: fullName = firstName + ' ' + middleInitial + ' ' + lastName;
20: }
21:
22: public String getFirstName() {
23: return firstName;
24: }
25:
26: public Character getMiddleInitial() {
27: return middleInitial;
28: }
29:
30: public String getLastName() {
31: return lastName;
32: }
33:
34: public String getFullName() {
35: return fullName;
36: }
37: }
|