Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem Description: You are tasked with implementing an Employee Management System using linked lists in Java. The system should be able to perform basic operations

Problem Description:
You are tasked with implementing an Employee Management System using linked lists in Java. The
system should be able to perform basic operations such as adding, deleting, and displaying employee
records. Each employee record should store information such as employee ID
,
name, position, and
salary.
Requirements:
1
.
Employee Class:
-
Create a class named
`
Employee
`
with the following attributes:
-
`
int employeeID
`
-
`
String name
`
-
`
String position
`
-
`
double salary
`
2
.
LinkedList Class:
-
Implement a linked list to store Employee objects.
-
Create a class named
`
EmployeeLinkedList
`
with the following methods:
-
`
void addEmployee
(
Employee emp
)
`
-
Add a new employee to the list.
-
`
void deleteEmployee
(
int employeeID
)
`
-
Delete an employee by their ID
.
-
`
void displayEmployees
(
)
`
-
Display details of all employees in the list.
3
.
Menu
-
Driven Program:
-
Implement a menu
-
driven program in the main class that allows users to interact with the Employee
Management System.
-
The menu should include options for:
-
Adding a new employee
-
Deleting an employee
-
Displaying all employees
-
Exiting the program
4
.
Data Validation:
-
Validate user input to ensure that the employee ID is unique, and that salary is a positive number.
-
Handle edge cases gracefully
(
e
.
g
.
,
deleting an employee not in the list
)
.
Example:
`
`
`
java
public class Employee
{
/
/
Employee class implementation
}
public class EmployeeLinkedList
{
/
/
LinkedList class implementation
}
public class EmployeeManagementSystem
{
public static void main
(
String
[
]
args
)
{
/
/
Menu
-
driven program implementation
}
}
`
`
`
Also: Provide a brief report on the design choices you made, challenges faced, and any improvements you would make if you had more time.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions