Permalink
Browse files

Ahora sí los ultimos

  • Loading branch information...
1 parent 3e89b82 commit 2eba39ebcd9895c2ecb8870e82a1fde53612210e @rubensanroman rubensanroman committed Apr 30, 2012
@@ -52,10 +52,14 @@ private String getDate() {
}
private void appendExpense(String expenseType, int expenseAmount) {
- mealExpenses = (expenseType == "Dinner" || expenseType == "Breakfast") ? mealExpenses+expenseAmount : mealExpenses;
+
+ if (expenseType == "Dinner" || expenseType == "Breakfast") mealExpenses += expenseAmount;
+
reportOutPut += ((expenseType == "Dinner" && expenseAmount > 5000) || (expenseType == "Breakfast" && expenseAmount > 1000)) ? "X" : " ";
reportOutPut += "\t"+expenseType+"\t$"+expenseAmount/100.0+"\n";
+
totalExpenses += expenseAmount;
+
}
}

0 comments on commit 2eba39e

Please sign in to comment.