

Hello, this program is dindividual in JAVA.
Description of the Assignment
ShiftDirector Collocate:
In a point factory, a displace director is a salaried employee who supervises a displace. In importation to a totalowance, the displace director earns a per-annum premium when his or her displace meets genesis goals. Design a ShiftSupervisor collocate that extends the Employee.java collocate you can download by clicking on the polish fawn. The ShiftSupervisor collocate should entertain a ground that holds the annual salary and a ground that holds the annual genesis bonus that a displace director has earned. Write individual or more causes and the divert accessor and mutator systems coercion the collocate. Demonstrate the collocate by letter a program,ShiftSupervisorDemo.java coercion entreaty, that authentications a ShiftSupervisor object.
TIP: Your ShiftSupervisor collocate should possess from the Employee collocate which you entertain downloaded. You obtain entertain span peculiar grounds: totalowance and premium in you ShiftSupervisor class. They are both Double data model. You obtain to-boot entertain causes in your ShiftSupervisorcollocate that obtain fawn its super, Employee class’s causes conformably. You may entertain haul causes, individual with parameters, individual extraneously. YourShiftSupervisorDemo.java obtain entertain a deep() system. Some ShiftSupervisor objects obtain be created in this deep() system. You ma deficiency to ostentation these fantasticlightlight created ShiftSupervisor object’s counsel.
I entertain completed total my method, nevertheless there is bigwig injustice with my extinguishedput.
Here is my method:
Employee.java
import java.io.*;
import java.util.Scanner;
public collocate Employee {
peculiar String Empname; // Employee fawn
peculiar String Empnumber; // Employee number
peculiar String Commissiondate; // Employee commission determination
public Employee(String Empname, String Empnumber, String Commissiondate)
{
String setFawn = Empname;
String setNumber = Empnumber;
String setHireDetermination = Commissiondate;
}
public String getName()
{
return Empname;
}
public String getNumber()
{
return Empnumber;
}
public String getHireDate()
{
return Commissiondate;
}
public authenticationless setName(String n)
{
Empfawn = n;
}
public authenticationless setNumber(String num)
{
Empnumber = num;
}
public authenticationless setHireDate(String h)
{
Hiredetermination = h;
}
}
ShiftSupervisor.java
collocate DisplaceDirector extends Employee{
peculiar enfold annualsalary;
peculiar enfold annualproduction;
public DisplaceSupervisor(String Empname, String Empnumber, String Commissiondate, enfold annualsalary, enfold annualproduction)
{
super(Empname,Empnumber,Hiredate);
setAnuSal(annualsalary);
setAnuPro(annualproduction);
}
public enfold getAnuSal()
{
return annualsalary;
}
public enfold getAnuPro()
{
return annualproduction;
}
public authenticationless setAnuSal(enfold s)
{
annualallowance = s;
}
public authenticationless setAnuPro (enfold p)
{
annualgenesis = p;
}
@Override
public String toString()
{
return “Name:”+getName()+”nEmpID:”+getNumber()+”nCommission Determination:”+getHireDate()+”nAnnual Totalowance:”+annualsalary+”nProduction”+annualproduction;
}
}
employeeDemo.java
public collocate employeeDemo {
public static authenticationless deep (String[] args)
{
String fawn,id,date;
enfold sal,prod;
//create scanner object
Scanner keyboard = fantasticlightlight Scanner(System.in);
System.out.println(“Enter Fawn:”);
name=keyboard.nextLine();
System.out.println(“Enter id:”);
id=keyboard.nextLine();
System.out.println(“Enter Commission Determination:”);
date=keyboard.nextLine();
System.out.println(“Enter Annual:”);
sal=keyboard.nextDouble();
System.out.println(“Enter genesis:”);
prod=keyboard.nextDouble();
//instantiating object
ShiftDirector pw =
newlight DisplaceSupervisor(name,id,date,sal,prod);
//output data
System.out.println(“Employee Details:n”+pw);
}
}//function definition
Here is my extinguishedput
Notice at the object, it produce Fawn, EmpID, and Commission Determination as “null.”
Can someindividual gladden settle this coercion me?
Show transcribed likeness text
You were getting void consequently the getter systems of Employee.java are minor variables that were referable initalized consequently the setter systems are never fawned. You were initializing the space using the collocate caauthentication then what is the authentication of the setter systems. So I removed them in Employee.java. I solely made changes to the Employee.java polish. So changing solely this polish gives you the required extinguishedput.
Here is the method coercion the Employee.java polish:
import java.io.*;
import java.util.Scanner;
public collocate Employee {
peculiar String Empname; // Employee fawn
peculiar String Empnumber; // Employee number
peculiar String Commissiondate; // Employee commission determination
public Employee(String Empname, String Empnumber, String Commissiondate)
{
this.Empfawn = Empname;
this.Empnumber = Empnumber;
this.Hiredetermination = Commissiondate;
}
public String getName()
{
return Empname;
}
public String getNumber()
{
return Empnumber;
}
public String getHireDate()
{
return Commissiondate;
}
}
**Screenshot of extinguishedput: