subject

Design two subclasses of Employee…SalariedEmployee and HourlyEmployee. A salaried employee has an annual salary attribute. An hourly employee has an hourly pay rate attribute, an hours worked attribute, and an earnings attribute. An hourly employee that works more than 40 hours gets paid at 1.5 times their hourly pay rate. You will decide how to implement constructors, getters, setters, and any other methods that might be necessary. 1. (20 points) Draw a UML diagram for the classes. 2. (80 points) Implement the classes, and write a test program that creates a salaried employee and two hourly employees. One of the hourly employees should have hours worked set to less than 40 and one should have hours worked set to more than 40. The test program should display all attributes for the three employees. To keep things simple, the employee classes don’t need to do any editing.

public class Employee
{
private int empID;
Address address;
Name name;
Date date;

public Employee()
{
}

public Employee(int empID)
{
this. empID = empID;
}

public int getEmpID()
{
return empID;
}

public void setEmpID(int empID)
{
this. empID = empID;
}

public Address getAddress()
{
return address;
}

public void setAddress(Address address)
{
this. address = address;
}

public Name getName()
{
return name;
}

public void setName(Name name)
{
this. name = name;
}

public Date getDate()
{
return date;
}

public void setDate(Date date)
{
this. date = date;
}

}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:50
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
question
Computers and Technology, 23.06.2019 13:50
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
While inserting images, the picture command is usually used to insert photos from a digital camera, and the clip art command is usually used to a.edit the sizes and other characteristics of photos that have been inserted. b.take a screenshot of an image and copy it to the clipboard for pasting. c.search for drawings or other images from a library of prepared pictures. d.make illustrations using lines and shapes that are easy to manipulate.
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
What are some examples of what can be changed through options available in the font dialog box? check all that apply. font family italicizing bolding pasting drop shadow cutting character spacing special symbols
Answers: 2
You know the right answer?
Design two subclasses of Employee…SalariedEmployee and HourlyEmployee. A salaried employee has an an...
Questions
question
Mathematics, 18.03.2020 21:07
question
Social Studies, 18.03.2020 21:07