Skip to content

Commit

Permalink
Removal of Method
Browse files Browse the repository at this point in the history
This method removed seemed to have an unused end goal. This was removed on the basis of unfocused code as described in the Characteristics of Clean Code described in baeldung. The result returns a null value and if it was used later in development it could serve potential unhandled nulls which would be harder to trace back to this unlogged null. With the code being unused and not serving current function it would be my recommendation to remove the method.
Source:
https://www.baeldung.com/java-clean-code
  • Loading branch information
Yep-Was-Taken committed Nov 8, 2021
1 parent 5b7cef4 commit 0e9d06d
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@ public double totalEstimatedCostOfEntireCart()
return estimatedTotal;
}

/**
* Returns details of a order for a given cart based on its foodId
* @param foodId a unique identifier to represent a Food object
* @return a CartOrder object which contains food details and its quantity for this cart
*/
public CartOrder getOrderDetailsInCart(String foodId) {
//TO DO Implementation
return null;
}

/**
* To add or update an order to your cart. If the food item exists, then update quantity. Otherwise, add
* a new order in the orders HashMap
Expand Down

0 comments on commit 0e9d06d

Please sign in to comment.