Answer to Question #29536 in AJAX | JavaScript | HTML | PHP for gloria

Question #29536
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;
}

public void display()
{
super.display();
JOptionPane.showMessageDialog(null, "
SSN: " + getSSN() +
"
Annual Salary: " + getAnnSalary() + "
Department: " +
getDepartment(), "Information", JOptionPane.QUESTION_MESSAGE);
}
}


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS