Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ahora sí los ultimos

  • Loading branch information...
commit 2eba39ebcd9895c2ecb8870e82a1fde53612210e 1 parent 3e89b82
@rubensanroman rubensanroman authored
View
BIN  out/production/Expense-report/expenseReport/ExpenseReport.class
Binary file not shown
View
6 src/expenseReport/ExpenseReport.java
@@ -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;
+
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.