Class DeleteCustomerAction

java.lang.Object
trial.gaurav.customer.DeleteCustomerAction
All Implemented Interfaces:
Action

public class DeleteCustomerAction extends Object implements Action
The `DeleteCustomerAction` class represents an action to delete a customer from the customer records. It implements the `Action` interface to define the behavior of the action when selected in the menu.
  • Field Details

  • Constructor Details

    • DeleteCustomerAction

      public DeleteCustomerAction(LinkedList<Customer> cRecords, CustomerConsoleManager cConsoleManager)
      Constructs a new `DeleteCustomerAction` object with the given customer records and customer console manager.
      Parameters:
      cRecords - The linked list containing the existing customer records.
      cConsoleManager - The customer console manager used to collect the customer ID for deletion.
  • Method Details

    • select

      public void select()
      Performs the action to delete a customer from the customer records. The method collects the customer ID from the user, checks if the customer exists, and removes the customer from the records if found.
      Specified by:
      select in interface Action