Write a java program to store employee information in a linked list, the program
ID: 658651 • Letter: W
Question
Write a java program to store employee information in a linked list, the program should implement the following functions: function task Insert a new employee Add an new employee to the linked list and store employee's information ( ID, name, address, department, salary) Update employee information Modify an existing employee's information (change address and salary only). You should ask for employee ID to update his/her information Remove an employee Remove the employee using employee ID from the linked list The program should display the list of functions, and ask the user to enter the number of function that he/she wants to do, then perform the function as it is required in the previous table. Finally Display all current employees in your linked list, you can create a function called
Explanation / Answer
Import java. io.*;
public class Employee
{
public Employee()
{
public int ID;
public string name;
public string street;
public string town;
public string postcode;
public int payrollNo;
public char taxcode;
public Employee( int ID, string name, string street, string town, string postcode, int payrollNo, char taxcode)
this.name = name;
this.street=street;
thls.town =town;
thls.postcode = postcode;
this.payrollNo = payroliNo;
thls.taxcode=taxcode;
thls.ID =ID;
public string getName()
{
return name;
}
public void setName(string name)
{
this.name=name;
}
public string getstreet()
{
return street;
}
public void setstreet(string Street)
{
this.street=street;
}
public String getTown()
{
return town;
}
public void setTown(string town)
{
this.town s town;
}
public string getPostcode() {
return postcode;
}
public void setPostcode(string postcode)
{
this.postcode= postcode;
}
public int getPayrollNo()
{
return payroilNo;
}
public void setPayrollNo(int payroliNo) {
this.payrollNo =payroilNo;
}
public char getTaxcode()
{
return taxcode;
}
public void setTaxcode(char taxcode)
{
this.taxcode= taxcode;
}
public string getType()
{
return type;
}
public void setType(string type)
{
this.type = type;
}
public string tostring() -
return Name: + thls.name +
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.