public class Expense extends CafetData
getExpenses or even directly whith the Data
static method getClientExpenses().| Constructor and Description |
|---|
Expense()
The Expense object is the one that stores every expense's information for
later use, it's generaly generated by the Client's method
getExpenses or even directly whith the Data
static method getClientExpenses(). |
Expense(int id,
int client,
Calendar date,
float total,
float balanceAfterTransaction)
The Expense object is the one that stores every expense's information for
later use, it's generaly generated by the Client's method
getExpenses or even directly whith the Data
static method getClientExpenses(). |
| Modifier and Type | Method and Description |
|---|---|
float |
getBalanceAfterTransaction()
Return the balance after the transaction
|
Client |
getClient()
Return the client who has spent money
|
Calendar |
getDate()
Return the date of the transaction in a
Calendar object |
ExpenseDetail[] |
getDetails()
Return the itemized bill
|
int |
getId()
Return the id of the expense
|
double |
getTotal()
Return the total price of products the client bought
|
String |
toString() |
public Expense(int id,
int client,
Calendar date,
float total,
float balanceAfterTransaction)
getExpenses or even directly whith the Data
static method getClientExpenses().id - - the id of the expense in the databaseclient - - the clien wich performed this transactiondate - - the date at wich the transaction has been completed (a Calendar object)total - - the total price dued from the clientbalanceAfterTransaction - - the balance of the clien after the transactionExpensepublic Expense()
getExpenses or even directly whith the Data
static method getClientExpenses().Expensepublic final int getId()
public final Client getClient() throws APIException, IOException
IOExceptionAPIExceptionpublic final Calendar getDate()
Calendar objectpublic final double getTotal()
public final float getBalanceAfterTransaction()
public final ExpenseDetail[] getDetails() throws APIException, IOException
IOExceptionAPIExceptionCopyright © 2019 Nowtryz. All rights reserved.