Skip to content

Update & Delete Employees

Objective

Add update and delete capabilities to the Employee application.


Requirements

  1. Add the capability to update and delete employees in the EmployeeDirectory class.
  2. Use try-with-resources for resource management.
  3. Use prepared statements for database queries.
  4. Display a success or failure message to the user after each operation.

Commit History

Make sure to commit frequently to maintain a clear, well-documented history of your process and progress throughout the challenge.


Submission

  1. Save the below screenshots to the screenshots/challenges directory

    Screenshots for Deletion:

    1. Employee removal form, with success message, name this: employeeExists.png
    2. Search for the removed employee to validate they have been removed, name this: employeeDeletion.png

    Screenshots for Updates:

    1. Show an employee without having updated any fields, name this: employeeBeforeUpdate.png
    2. Perform an update and then search for the employee. Show the updated fields, name this: employeeAfterUpdate.png
  2. Push your code to GitHub

  3. Create an issue and name it "Challenge - Remove/Update Employee".

  4. Reflect on this challenge: Copy the below text and paste it into the "Add a description" textarea.

@kkschumacher

1. What resources did you use to complete this challenge?

2. What does your commit history look like for this challenge? Does it clearly show your process and progress?

3. What obstacles did you overcome? 

4. What did you learn by completing this challenge?

Rubric

All of the following must be satisfied to achieve a "Met" status

  • Screenshots: Screenshots clearly show expected output.
  • Debugging & Problem-Solving: Code is free from errors.
  • Code Quality: Code is exceptionally clean, efficient, and maintainable. Follows best practices, coding standards, and programming principles.
  • Functionality: The update and delete functionaly successfully updates the database and message is displayed the user after the query.
  • Employee Directory: Methods for deleting or updating employees to the database are added. Ensures effective error handling with try-with-resources and uses prepared statements.
  • Code Documentation: Proper JavaDoc is used.
  • External Sources: External sources (websites, classmates, AI tools, etc), if utilized, are referenced and documented within the code as comments.