1
00:00:05,490 --> 00:00:07,750
Welcome back everyone for your O.P. project.

2
00:00:07,770 --> 00:00:09,520
Exercise.

3
00:00:09,640 --> 00:00:13,450
This is going to be a quick little project to make sure you've understood the very basics of object

4
00:00:13,450 --> 00:00:14,730
oriented programming.

5
00:00:14,980 --> 00:00:20,350
For this challenge you're going to create a bank account class that has two attributes an owner attributes

6
00:00:20,710 --> 00:00:22,080
and a balance attribute.

7
00:00:22,270 --> 00:00:28,760
It will also have two methods the withdrawal method and a deposit method as an added requirement.

8
00:00:28,770 --> 00:00:31,710
Withdrawals may not exceed the available balance.

9
00:00:31,710 --> 00:00:36,670
So if in your withdrawal method you'll have to add some logic that checks the actual balance on the

10
00:00:36,670 --> 00:00:37,770
accounts.

11
00:00:37,770 --> 00:00:40,750
Let's take a look at the finished class should be able to do.

12
00:00:40,770 --> 00:00:42,890
I'm going to open up the project that py file.

13
00:00:43,110 --> 00:00:46,440
Ok so this is what the actual file looks like for your project.

14
00:00:46,440 --> 00:00:51,840
Again you need to create an account or bank account class that has an owner and balance attribute and

15
00:00:51,840 --> 00:00:57,420
will be able to take deposits and also execute withdrawals and as the requirement the withdrawal can't

16
00:00:57,420 --> 00:01:02,910
exceed the available balance so it should return some kind of error or warning message.

17
00:01:03,030 --> 00:01:07,920
So he already set up a class account here and it's your job to fill it in with those two attributes

18
00:01:07,950 --> 00:01:09,270
and those two methods.

19
00:01:09,420 --> 00:01:14,810
Then you should be able to test the account by following along with these test steps.

20
00:01:14,940 --> 00:01:17,270
So you should be able to instantiate the class.

21
00:01:17,280 --> 00:01:18,300
So looks something like this.

22
00:01:18,300 --> 00:01:22,710
Here we have an account where the owner's Jose and the balance is one hundred and they should be able

23
00:01:22,710 --> 00:01:24,090
to print the account.

24
00:01:24,100 --> 00:01:26,100
Remember those special methods were covered.

25
00:01:26,490 --> 00:01:32,040
They should be able to show the account owner showed the account balance issue Bill to print out those

26
00:01:32,040 --> 00:01:35,390
attributes then make a series of deposits and withdrawals.

27
00:01:35,430 --> 00:01:41,160
So the posit $50 withdraw $75 and then at the end try to make a withdrawal that exceeds the available

28
00:01:41,160 --> 00:01:47,160
balance which is 500 and that should return some sort of message saying sorry it can't be done.

29
00:01:47,190 --> 00:01:47,670
OK.

30
00:01:47,880 --> 00:01:49,270
Best of luck on this project.

31
00:01:49,290 --> 00:01:50,330
We'll see you in the next lecture.

32
00:01:50,340 --> 00:01:51,540
When we go over the solution.
