Created
November 22, 2015 19:18
-
-
Save GedMullen/358fecd38c195b52a3e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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