src/Controller/AddProductController.java
/**
     * * Delete Button Handler first throws a CONFIRMATION alert to confirm
     * that the user wishes to delete a part from the list of Associated Parts
     * that belong to the product. If the user confirms then the part will be
     * removed. If the user cancels then the part will stay in the Associated
     * Parts list.
     *
     * @param event
     */
Delete Button Handler first throws a CONFIRMATION alert to confirm
that the user wishes to delete a part from the list of Associated Parts
that belong to the product. If the user confirms then the part will be
removed. If the user cancels then the part will stay in the Associated
Parts list.

@param event
Delete Button Handler first throws a CONFIRMATION alert to confirm that the user wishes to delete a part from the list of Associated Parts that belong to the product . If the user confirms then the part will be removed . If the user cancels then the part will stay in the Associated Parts list . @param event
@FXML
    private void deleteBtnHandler(ActionEvent event) {
        Part selectedPart = deleteTable.getSelectionModel().getSelectedItem();
        Alert deleteConfirm = new Alert(Alert.AlertType.CONFIRMATION);
        deleteConfirm.setTitle("CONFIRMATION: REMOVE PART");
        deleteConfirm.setHeaderText("Would you like to remove " + selectedPart + " from the product's part list?");
        deleteConfirm.setContentText("Click OK to remove the part.\nClick CANCEL to close this window and keep the part.");
        deleteConfirm.showAndWait();
        if (deleteConfirm.getResult() == ButtonType.OK) {
            System.out.println("User confirmed.\n" + selectedPart + " has been removed from Product's part list.");
            Product.deleteAssociatedPart(selectedPart);
            associatedParts.remove(selectedPart);
            updateDeleteTable();
            Alert removeAlert = new Alert(Alert.AlertType.INFORMATION);
            removeAlert.setTitle("SUCCESS: PART REMOVED");
            removeAlert.setHeaderText(selectedPart + " has been removed from the part list.");
            removeAlert.setContentText("Click OK to close this window.");
            removeAlert.showAndWait();
        } else {
            System.out.println("User cancelled part removal.\nClosing alert window.");
            deleteConfirm.close();
        }
    }
@ FXML private void deleteBtnHandler ( ActionEvent event ) { Part selectedPart = deleteTable . getSelectionModel ( ) . getSelectedItem ( ) ; Alert deleteConfirm = new Alert ( Alert . AlertType . CONFIRMATION ) ; deleteConfirm . setTitle ( "CONFIRMATION: REMOVE PART" ) ; deleteConfirm . setHeaderText ( "Would you like to remove " + selectedPart + " from the product's part list?" ) ; deleteConfirm . setContentText ( "Click OK to remove the part.\nClick CANCEL to close this window and keep the part." ) ; deleteConfirm . showAndWait ( ) ; if ( deleteConfirm . getResult ( ) == ButtonType . OK ) { System . out . println ( "User confirmed.\n" + selectedPart + " has been removed from Product's part list." ) ; Product . deleteAssociatedPart ( selectedPart ) ; associatedParts . remove ( selectedPart ) ; updateDeleteTable ( ) ; Alert removeAlert = new Alert ( Alert . AlertType . INFORMATION ) ; removeAlert . setTitle ( "SUCCESS: PART REMOVED" ) ; removeAlert . setHeaderText ( selectedPart + " has been removed from the part list." ) ; removeAlert . setContentText ( "Click OK to close this window." ) ; removeAlert . showAndWait ( ) ; } else { System . out . println ( "User cancelled part removal.\nClosing alert window." ) ; deleteConfirm . close ( ) ; } }
* Delete Button Handler first throws a CONFIRMATION alert to confirm
 that the user wishes to delete a part from the list of Associated Parts
 that belong to the product.
* Delete Button Handler first throws a CONFIRMATION alert to confirm that the user wishes to delete a part from the list of Associated Parts that belong to the product .