Skip to content

Instantly share code, notes, and snippets.

@GedMullen
Created November 22, 2015 19:18
Show Gist options
  • Save GedMullen/358fecd38c195b52a3e6 to your computer and use it in GitHub Desktop.
Save GedMullen/358fecd38c195b52a3e6 to your computer and use it in GitHub Desktop.
public class CareWorker {
private String firstName;
private String secondName;
private String speciality;
private String manner="Polite";
public CareWorker(String firstName, String secondName, String speciality){
this.firstName = firstName;
this.secondName = secondName;
this.speciality = speciality;
}
protected String getFirstName() {
return firstName;
}
protected String getSecondName() {
return secondName;
}
protected String getSpeciality(){
return speciality;
}
protected String getFullName(){
return firstName + " " + secondName;
}
protected String getBedsideManner(){
return manner;
}
public static void main(String[] args) {
CareWorker careWorker = new CareWorker("Jeff", "Mullen", "Brain Surgeon");
System.out.println(careWorker.getFullName());
System.out.println(careWorker.getBedsideManner());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment