Class ViewCustomerAction

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

public class ViewCustomerAction extends Object implements Action
The `ViewCustomerAction` class represents an action to view a specific 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

    • ViewCustomerAction

      public ViewCustomerAction(LinkedList<Customer> cRecords, CustomerConsoleManager cConsoleManager)
      Constructs a new `ViewCustomerAction` 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 viewing.
  • Method Details

    • select

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