So how's that account software coming along?
Well, let's see what I would come up with.
Class accounts.
We've defined a class just like that.
And then I said to variables, one for expenses, one for income.
So var income of type integer.
Is equal to zero because that's how we start every day for our expenses of type integers, equal to
zero as well, because again, that's how we start every day.
Simple enough now create two functions to add to those.
Let's have a funk.
Ad income.
And we're going to have an amount that goes into that, obviously.
And then we're going to add that to self-taught income plus equals the amount.
Simple, simple enough, and they're going to just copy that.
And modify it for expenses.
Self-taught expenses.
Plus equals the amount.
So that's part one of the homework, right?
Here's part two of the homework.
Let me copy this over here.
Make a function in the class to calculate the profit, which is income minus expense.
Then I want you to print three things out the income, the expense and the profit, and I want you to
print them out.
Using.
A variable like this, so here I have my accounts, I can say accounts don't add income at 13 dollars
and I can have accounts, don't add expense of twelve dollars.
So my profit would be one dollar.
So I'm giving you the clue how to access functions inside of an object created by a class or created
from a class or other.
Now I want you to add another function that checks the profit and then also allows us to print out the
profit.
So good luck.