1 00:00:00,150 --> 00:00:02,340 So how's that account software coming along? 2 00:00:03,120 --> 00:00:06,240 Well, let's see what I would come up with. 3 00:00:06,600 --> 00:00:07,770 Class accounts. 4 00:00:08,410 --> 00:00:10,110 We've defined a class just like that. 5 00:00:10,500 --> 00:00:13,410 And then I said to variables, one for expenses, one for income. 6 00:00:13,410 --> 00:00:17,580 So var income of type integer. 7 00:00:19,730 --> 00:00:26,350 Is equal to zero because that's how we start every day for our expenses of type integers, equal to 8 00:00:26,350 --> 00:00:29,410 zero as well, because again, that's how we start every day. 9 00:00:29,950 --> 00:00:33,460 Simple enough now create two functions to add to those. 10 00:00:34,960 --> 00:00:35,800 Let's have a funk. 11 00:00:36,770 --> 00:00:37,430 Ad income. 12 00:00:42,300 --> 00:00:45,960 And we're going to have an amount that goes into that, obviously. 13 00:00:48,050 --> 00:00:53,150 And then we're going to add that to self-taught income plus equals the amount. 14 00:00:54,660 --> 00:00:58,770 Simple, simple enough, and they're going to just copy that. 15 00:01:00,880 --> 00:01:02,650 And modify it for expenses. 16 00:01:07,970 --> 00:01:10,040 Self-taught expenses. 17 00:01:11,170 --> 00:01:12,640 Plus equals the amount. 18 00:01:13,060 --> 00:01:15,280 So that's part one of the homework, right? 19 00:01:15,760 --> 00:01:18,400 Here's part two of the homework. 20 00:01:20,050 --> 00:01:21,420 Let me copy this over here. 21 00:01:24,150 --> 00:01:29,460 Make a function in the class to calculate the profit, which is income minus expense. 22 00:01:30,380 --> 00:01:36,600 Then I want you to print three things out the income, the expense and the profit, and I want you to 23 00:01:36,600 --> 00:01:37,650 print them out. 24 00:01:39,590 --> 00:01:40,550 Using. 25 00:01:42,820 --> 00:01:53,050 A variable like this, so here I have my accounts, I can say accounts don't add income at 13 dollars 26 00:01:53,260 --> 00:01:58,870 and I can have accounts, don't add expense of twelve dollars. 27 00:01:59,290 --> 00:02:00,880 So my profit would be one dollar. 28 00:02:02,260 --> 00:02:08,890 So I'm giving you the clue how to access functions inside of an object created by a class or created 29 00:02:08,890 --> 00:02:10,060 from a class or other. 30 00:02:10,390 --> 00:02:16,840 Now I want you to add another function that checks the profit and then also allows us to print out the 31 00:02:16,840 --> 00:02:17,380 profit. 32 00:02:17,830 --> 00:02:19,330 So good luck.