First, do you really need set methods? Most of the time you can use constructor arguments to set the fields and set methods aren't required:
Scanner in = new Scanner ( System.in ).useDelimiter ( ' ' );
System.out.print ( "Full name (ex. John Smith): " );
String first = in.next();
String last = in.next();
Client obj = new Client ( first, last );
Then writing the get methods only consists of returning the necessary field. The chances of an object representing a person needing to change the name are very slim, so set methods don't make much sense except in very specific situations.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
Please use code tags when posting your code. use the rightmost icon above the text input field. The one that says: [CODE]
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656