You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Increments costs by given amountpublicvoidincrementCosts(doubleincrement) {
if (increment < 0) thrownewIllegalArgumentException();
elsethis.costs += increment;
}
What to do
Create a custom exception with a descriptive name, such as NegativeSalesException/NegativeCostsException.
The text was updated successfully, but these errors were encountered:
Both methods throw illegal argument exception. Create a custom exception for either (or both) method(s).
Where to find
Iteration 3, Inventory package, class Shop
incrementSales() method:
incrementCosts() method:
What to do
Create a custom exception with a descriptive name, such as NegativeSalesException/NegativeCostsException.
The text was updated successfully, but these errors were encountered: