Question: Please use java data structure(arrayStack or Linked list to do this) Public double totalCost(); *Calculates total cost of the product in shopping list. *Return the
Please use java data structure(arrayStack or Linked list to do this)
Public double totalCost();
*Calculates total cost of the product in shopping list.
*Return the total cost of all products in the shopping list
*Return 0 if shopping list is empty
Public boolean removeProduct(String product);
*Remove and return true if the product was removed.
*Return false if cannot find product in the shopping list.
*Remove product name.
Public void clear();
*Clear all product in shopping list.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
