Develop a set of classes for a college to use in various student service and personnel applications:
design a CollegeEmployee- CollegeEmployee descends from Person. A CollegeEmployee also includes a Social Security number, an annual salary, and a department name, as well as methods that override the Person methods to accept and display all CollegeEmployee data. (9)
1
Expert's answer
2013-05-13T11:35:28-0400
import javax.swing.JOptionPane; public class CollegeEmployee extends Person { protected String ssn; protected double annSalary; protected String department;
public CollegeEmployee() { super(); }
public void setSSN(String ssn) { this.ssn = ssn; }
public void setAnnSalary(double annSalary) { this.annSalary = annSalary; }
public void setDepartment(String department) { this.department = department; }
public String getSSN() { return ssn; }
public double getAnnSalary() { return annSalary; }
public String getDepartment() { return department; }
Comments
Leave a comment