Skip to content
Snippets Groups Projects
Commit ac8a7d80 authored by Goik Martin's avatar Goik Martin
Browse files

Corrections

parent 045bbbda
No related branches found
No related tags found
No related merge requests found
......@@ -8,8 +8,8 @@ package party;
*
*/
public class NoOrganizerException extends ArithmeticException {
@Override
public String getMessage() {
return "No organizer has been defined. How shall I share costs?";
}
public NoOrganizerException(float expenses) {
super("No organizer has been defined. How shall I share " + expenses + " of expenses?");
}
}
......@@ -5,7 +5,7 @@ package party;
* @author goik
*
* Provide statistical information regarding a party. We distinguish
* between the numbers of guests and the number of organizers.
* between the number of guests and the number of organizers.
* The whole party will cost a certain amount of money being set
* by the {@link #setExpenses(float)} method.
*
......
......@@ -16,7 +16,7 @@ abstract class PartyStatisticsAverageImpl implements PartyStatistics {
if (0 < numOrganizers) {
return expenses / numOrganizers;
} else {
throw new NoOrganizerException();
throw new NoOrganizerException(expenses);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment