Skip to content

Conversation

Dlafferty251
Copy link
Contributor

Adds exception handling for bad order and product ID

@@ -17,9 +17,16 @@ public void addProduct(String productId, String name) {
products.put(productId, new Product(productId, name));
}

public String placeOrder(String productId, int quantity) {
// Tells the method that it should expect to throw an exception
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're going to add a comment for a method, you must use JavaDoc:

https://stackoverflow.com/questions/11763803/how-to-document-my-method-in-java-like-java-docs

@Dlafferty251 Dlafferty251 changed the title Feat: Homework14 e commerce exceptions Feat: Adds Exception Handling for invalid input for Order and Product Apr 11, 2025
@Dlafferty251 Dlafferty251 deleted the Homework14-e-commerce-exceptions branch April 25, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants