Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package hwk5_taylen_schmaltz;
- /**
- *
- * @author tayle_000
- */
- public class Employee {
- private String fullName;
- private String empDept;
- private String location;
- private DeptName aDept;
- public Employee(String last, String first, int dpt) {
- fullName = last + first;
- aDept = new DeptName(dpt);
- empDept = aDept.getDepartment();
- location = aDept.getLocation();
- }
- public Employee(String aName, int dpt) {
- fullName = aName;
- aDept = new DeptName(dpt);
- empDept = aDept.getDepartment();
- location = aDept.getLocation();
- }
- public String getLocation() {
- return location;
- }
- public String getDept() {
- return empDept;
- }
- public String getName() {
- return fullName;
- }
- @Override
- public String toString() {
- return fullName + ", " + aDept.getDepartment() + ", " + getLocation();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement