Computers and Technology
Computers and Technology, 27.03.2020 17:57, feefee945

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;
}

}

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 16:50, Tyrant4life
Consider a slotted aloha system, where the time slot equals the fixed duration of each packet. assume that there are 4 stations a, b,c, d sharing the medium. (a) stations a, b,c, d receive one packet each from higher layers at times 1.3, 1.5, 2.6,5.7 respectively. show which transmissions take place when, according to the slottedaloha protocol; describe all transmissions until all four packets have been successful. when needed, each station has access to the following sequence of random number, provided by a random number generator and drawn uniformly between 0 and 1: (1) station a draws numbers: 0.31, 0.27, 0.78, 0.9, 0.9, 0.11, 0. (2) station b draws numbers: 0.45, 0.28, 0.11, 0.83, 0.37, 0.22, 0. (3)station c draws numbers: 0.1, 0.2, 0.3, 0.4, 0. (4) station d draws numbers: 0.36, 0.77, 0.9, 0.1, 0.1, 0.1, 0.1, 0. (b) in slotted aloha, a station transmits in each time slot with a given probability. what probabilities would you assign to each of the four stations so as to: (i) maximize the efficiency of the protocol? (ii) maximize fairness among the four stations? (c) will the efficiency increase or decrease if we modify slotted aloha as follows: (i) get rid of slots and allow stations to transmit immediately? (ii) implement carrier sensing? (iii) implement collision detection? (iv) implement collision avoidance?
Answers: 3
image
Computers and Technology, 24.06.2019 01:00, kkruvc
Mastercard managers are motivated to increase (1) the number of individuals who have and use a mastercard credit card, (2) the number of banks and other clents who issue mastercards to customers and/or employees, and (3) the number of locations that accept mastercard payments. discuss how mastercard could use its data warehouse to it expand each of these customer bases.
Answers: 3
image
Computers and Technology, 25.06.2019 11:30, domiyisthom
The main benefit of encryption of a hard drive
Answers: 1
image
Computers and Technology, 25.06.2019 14:00, craig4509
The first few lines of a script that say "using" that point the code to the right groups are called
Answers: 1
Do you know the correct answer?
Design two subclasses of Employee…SalariedEmployee and HourlyEmployee. A salaried employee has an an...

Questions in other subjects:

Konu
History, 07.10.2019 16:10