WEBVTT 1 00:00:01.790 --> 00:00:04.069 so as promised in the previous video now 2 00:00:04.069 --> 00:00:06.890 time for a mini-challenge but just a so as promised in the previous video now 3 00:00:06.890 --> 00:00:08.900 point before we start don't spend more time for a mini-challenge but just a 4 00:00:08.900 --> 00:00:10.429 than a minute or two thinking about this point before we start don't spend more 5 00:00:10.429 --> 00:00:11.269 one than a minute or two thinking about this 6 00:00:11.269 --> 00:00:13.370 it is designed to be just something you one 7 00:00:13.370 --> 00:00:14.809 should hopefully just get off the top of it is designed to be just something you 8 00:00:14.809 --> 00:00:16.580 your head so don't spend again too much should hopefully just get off the top of 9 00:00:16.580 --> 00:00:17.630 time on it your head so don't spend again too much 10 00:00:17.630 --> 00:00:19.369 so the challenge here is looking at the time on it 11 00:00:19.369 --> 00:00:21.079 way the last two examples have been so the challenge here is looking at the 12 00:00:21.079 --> 00:00:23.509 coded generally what is the difference way the last two examples have been 13 00:00:23.509 --> 00:00:25.220 between the approach taken here in all coded generally what is the difference 14 00:00:25.220 --> 00:00:27.050 the previous example we use prior between the approach taken here in all 15 00:00:27.050 --> 00:00:29.390 to that in this course have a think the previous example we use prior 16 00:00:29.390 --> 00:00:30.919 about that and come back when you to that in this course have a think 17 00:00:30.919 --> 00:00:32.059 ready end i will give you some more about that and come back when you 18 00:00:32.059 --> 00:00:33.860 information about that ready end i will give you some more 19 00:00:33.860 --> 00:00:38.930 okay welcome back the answer simply is information about that 20 00:00:38.930 --> 00:00:41.990 there's no real difference at all so the okay welcome back the answer simply is 21 00:00:41.990 --> 00:00:44.000 two of these two examples use classes there's no real difference at all so the 22 00:00:44.000 --> 00:00:45.680 but apart from the fact that i wrote the two of these two examples use classes 23 00:00:45.680 --> 00:00:47.510 classes in the program's is no real but apart from the fact that i wrote the 24 00:00:47.510 --> 00:00:49.820 difference to the methodology that classes in the program's is no real 25 00:00:49.820 --> 00:00:52.070 we employed in other words if the song difference to the methodology that 26 00:00:52.070 --> 00:00:54.050 album and artist classes had been part we employed in other words if the song 27 00:00:54.050 --> 00:00:56.510 of the standard library then there's album and artist classes had been part 28 00:00:56.510 --> 00:00:58.220 nothing to distinguish the approach here from of the standard library then there's 29 00:00:58.220 --> 00:01:00.410 anything else that we've done so far nothing to distinguish the approach here from 30 00:01:00.410 --> 00:01:02.899 so this program uses objects but it's anything else that we've done so far 31 00:01:02.899 --> 00:01:04.309 not object orientated programming so this program uses objects but it's 32 00:01:04.309 --> 00:01:07.370 object-oriented program is not just not object orientated programming 33 00:01:07.370 --> 00:01:08.930 about classes it's a different way of object-oriented program is not just 34 00:01:08.930 --> 00:01:11.720 thinking about problems and results in a about classes it's a different way of 35 00:01:11.720 --> 00:01:14.240 different program design so it uses thinking about problems and results in a 36 00:01:14.240 --> 00:01:16.280 classes and objects for sure but it also different program design so it uses 37 00:01:16.280 --> 00:01:18.020 includes important concepts such as classes and objects for sure but it also 38 00:01:18.020 --> 00:01:20.510 encapsulation composition inheritance includes important concepts such as 39 00:01:20.510 --> 00:01:23.510 and delegation now I have discuss encapsulation composition inheritance 40 00:01:23.510 --> 00:01:24.950 encapsulation at the start of this and delegation now I have discuss 41 00:01:24.950 --> 00:01:26.840 section we're going to be looking at encapsulation at the start of this 42 00:01:26.840 --> 00:01:28.430 inheritance and composition in later section we're going to be looking at 43 00:01:28.430 --> 00:01:30.740 videos delegation on the other hand inheritance and composition in later 44 00:01:30.740 --> 00:01:32.990 involves passing on responsibility for a videos delegation on the other hand 45 00:01:32.990 --> 00:01:35.000 task to another object that's better involves passing on responsibility for a 46 00:01:35.000 --> 00:01:37.010 suited to deal with it and it's fairly task to another object that's better 47 00:01:37.010 --> 00:01:38.810 you know real really closely tied to suited to deal with it and it's fairly 48 00:01:38.810 --> 00:01:41.299 encapsulation now for example we've you know real really closely tied to 49 00:01:41.299 --> 00:01:43.729 been encapsulated data in our classes but encapsulation now for example we've 50 00:01:43.729 --> 00:01:45.290 we haven't really encapsulated methods been encapsulated data in our classes but 51 00:01:45.290 --> 00:01:47.299 very well now there's an add song we haven't really encapsulated methods 52 00:01:47.299 --> 00:01:49.010 method in the album class and an add very well now there's an add song 53 00:01:49.010 --> 00:01:51.200 album method in the artist class but you method in the album class and an add 54 00:01:51.200 --> 00:01:52.310 know that's really it album method in the artist class but you 55 00:01:52.310 --> 00:01:54.500 these two methods were included because know that's really it 56 00:01:54.500 --> 00:01:56.810 the relevant classes own the lists that they will be these two methods were included because 57 00:01:56.810 --> 00:01:58.820 added to so it seemed quite natural the relevant classes own the lists that they will be 58 00:01:58.820 --> 00:02:00.229 that the artist class should be added to so it seemed quite natural 59 00:02:00.229 --> 00:02:02.450 responsible for adding album object to that the artist class should be 60 00:02:02.450 --> 00:02:04.970 the list but this only considers the responsible for adding album object to 61 00:02:04.970 --> 00:02:07.130 data has been no attempt to encapsulate the list but this only considers the 62 00:02:07.130 --> 00:02:09.229 the functionality of the program data has been no attempt to encapsulate 63 00:02:09.229 --> 00:02:11.749 encapsulation involves encapsulating the functionality of the program 64 00:02:11.749 --> 00:02:13.610 data and methods encapsulation involves encapsulating 65 00:02:13.610 --> 00:02:15.740 it's not just data so we really need data and methods 66 00:02:15.740 --> 00:02:17.450 to make some changes to turn this into it's not just data so we really need 67 00:02:17.450 --> 00:02:19.970 an object-oriented program rather than to make some changes to turn this into 68 00:02:19.970 --> 00:02:21.530 just a program that happens to use an object-oriented program rather than 69 00:02:21.530 --> 00:02:22.730 objects then there's obviously an just a program that happens to use 70 00:02:22.730 --> 00:02:24.440 important distinction between those two objects then there's obviously an 71 00:02:24.440 --> 00:02:27.800 encapsulating methods means considering important distinction between those two 72 00:02:27.800 --> 00:02:30.470 questions such as which object is best encapsulating methods means considering 73 00:02:30.470 --> 00:02:32.810 suited to dealing with this task or questions such as which object is best 74 00:02:32.810 --> 00:02:35.390 where the responsibility for a performing suited to dealing with this task or 75 00:02:35.390 --> 00:02:38.030 this function belong so relating this to where the responsibility for a performing 76 00:02:38.030 --> 00:02:40.700 the real world if my car breaks down i'm this function belong so relating this to 77 00:02:40.700 --> 00:02:41.630 going to look for someone who can the real world if my car breaks down i'm 78 00:02:41.630 --> 00:02:43.100 encapsulates the knowledge of how to going to look for someone who can 79 00:02:43.100 --> 00:02:43.940 fix it encapsulates the knowledge of how to 80 00:02:43.940 --> 00:02:46.130 mechanic in this case so my local fix it 81 00:02:46.130 --> 00:02:48.200 mechanic has been programmed by mechanic in this case so my local 82 00:02:48.200 --> 00:02:49.880 attending college perhaps with a knowledge mechanic has been programmed by 83 00:02:49.880 --> 00:02:52.160 necessary to fix a car so i'm going to attending college perhaps with a knowledge 84 00:02:52.160 --> 00:02:54.260 delegate the job to him or her necessary to fix a car so i'm going to 85 00:02:54.260 --> 00:02:56.120 similarly if I want an extension on my delegate the job to him or her 86 00:02:56.120 --> 00:02:57.709 house i'm not going to try building similarly if I want an extension on my 87 00:02:57.709 --> 00:02:59.840 myself going to find someone who's got house i'm not going to try building 88 00:02:59.840 --> 00:03:02.270 the skills to do this for me so and that's myself going to find someone who's got 89 00:03:02.270 --> 00:03:03.920 of course unless you're builder a the skills to do this for me so and that's 90 00:03:03.920 --> 00:03:05.420 builder encapsulates the skills required of course unless you're builder a 91 00:03:05.420 --> 00:03:07.250 to build something that won't fall down or builder encapsulates the skills required 92 00:03:07.250 --> 00:03:09.350 leak in the rain and consequently I to build something that won't fall down or 93 00:03:09.350 --> 00:03:13.100 delegate that task to them so relating leak in the rain and consequently I 94 00:03:13.100 --> 00:03:15.860 this back to our program looking at our delegate that task to them so relating 95 00:03:15.860 --> 00:03:17.660 load data method bring that up on the this back to our program looking at our 96 00:03:17.660 --> 00:03:20.239 screen that function is doing all the load data method bring that up on the 97 00:03:20.239 --> 00:03:22.250 work of parsing the data and working out screen that function is doing all the 98 00:03:22.250 --> 00:03:24.049 what to do when it finds a new album and work of parsing the data and working out 99 00:03:24.049 --> 00:03:26.480 a new song really though the object that what to do when it finds a new album and 100 00:03:26.480 --> 00:03:28.549 knows the most about albums is the a new song really though the object that 101 00:03:28.549 --> 00:03:30.739 artists and albums know all about songs knows the most about albums is the 102 00:03:30.739 --> 00:03:32.959 so we really should encapsulate the artists and albums know all about songs 103 00:03:32.959 --> 00:03:34.850 methods for dealing with albums in the so we really should encapsulate the 104 00:03:34.850 --> 00:03:37.519 artist class and for dealing with songs in methods for dealing with albums in the 105 00:03:37.519 --> 00:03:40.190 the album class so once that's done load artist class and for dealing with songs in 106 00:03:40.190 --> 00:03:42.380 data can delegate dealing with is to the the album class so once that's done load 107 00:03:42.380 --> 00:03:44.840 appropriate class will start by data can delegate dealing with is to the 108 00:03:44.840 --> 00:03:46.610 rewriting the load data function to appropriate class will start by 109 00:03:46.610 --> 00:03:48.620 delegate most of the work to the artists rewriting the load data function to 110 00:03:48.620 --> 00:03:50.900 class now when doing this I'm going to delegate most of the work to the artists 111 00:03:50.900 --> 00:03:53.060 be calling methods that haven't yet class now when doing this I'm going to 112 00:03:53.060 --> 00:03:55.280 been written now this may seem an odd be calling methods that haven't yet 113 00:03:55.280 --> 00:03:56.750 thing to do but an object-oriented been written now this may seem an odd 114 00:03:56.750 --> 00:03:58.760 approach means you don't have to worry thing to do but an object-oriented 115 00:03:58.760 --> 00:04:01.160 about how something is done you focus on approach means you don't have to worry 116 00:04:01.160 --> 00:04:03.049 the fact that you needed to be done and about how something is done you focus on 117 00:04:03.049 --> 00:04:04.970 something else will be responsible for the fact that you needed to be done and 118 00:04:04.970 --> 00:04:06.799 getting it done so that would make more something else will be responsible for 119 00:04:06.799 --> 00:04:08.600 sense when you see the load data code so getting it done so that would make more 120 00:04:08.600 --> 00:04:09.860 let's go ahead and do that sense when you see the load data code so 121 00:04:09.860 --> 00:04:12.200 so the first thing we want to do now if let's go ahead and do that 122 00:04:12.200 --> 00:04:13.519 load data is we're going to delete this so the first thing we want to do now if 123 00:04:13.519 --> 00:04:15.470 first bit of initialization code we no load data is we're going to delete this 124 00:04:15.470 --> 00:04:18.200 longer need that so delete those three first bit of initialization code we no 125 00:04:18.200 --> 00:04:21.290 lines they're or to be precise just longer need that so delete those three 126 00:04:21.290 --> 00:04:23.300 just those first two we want to leave lines they're or to be precise just 127 00:04:23.300 --> 00:04:25.190 the artist_list we still need just those first two we want to leave 128 00:04:25.190 --> 00:04:25.840 that the artist_list we still need 129 00:04:25.840 --> 00:04:28.990 ...what I'm going to do that 130 00:04:28.990 --> 00:04:30.850 is that even though it's going to ...what I'm going to do 131 00:04:30.850 --> 00:04:32.620 involve some code that has already been is that even though it's going to 132 00:04:32.620 --> 00:04:35.139 that exists on screen I'm going to delete it involve some code that has already been 133 00:04:35.139 --> 00:04:37.300 and retype some of this in just so you can that exists on screen I'm going to delete it 134 00:04:37.300 --> 00:04:39.550 see sort of much easier what's been and retype some of this in just so you can 135 00:04:39.550 --> 00:04:42.070 changed so i'm going to leave the width code see sort of much easier what's been 136 00:04:42.070 --> 00:04:43.600 so we were obviously changed so i'm going to leave the width code 137 00:04:43.600 --> 00:04:45.370 initializing the list on line 92 so we were obviously 138 00:04:45.370 --> 00:04:47.680 this basic code here that retrieves the initializing the list on line 92 139 00:04:47.680 --> 00:04:49.389 dialogue from albums . txt that's not this basic code here that retrieves the 140 00:04:49.389 --> 00:04:51.040 going to change and we still going to dialogue from albums . txt that's not 141 00:04:51.040 --> 00:04:52.840 leave that printing out but after going to change and we still going to 142 00:04:52.840 --> 00:04:54.430 that i'm going to remove all that code leave that printing out but after 143 00:04:54.430 --> 00:04:57.370 and delete it because we can that i'm going to remove all that code 144 00:04:57.370 --> 00:04:59.290 substantially reduce the amount of code and delete it because we can 145 00:04:59.290 --> 00:05:04.300 here so I'm now on line 101 and we're substantially reduce the amount of code 146 00:05:04.300 --> 00:05:06.910 going to process each entry that we're here so I'm now on line 101 and we're 147 00:05:06.910 --> 00:05:09.220 receiving or getting from the albums.txt going to process each entry that we're 148 00:05:09.220 --> 00:05:14.350 so... receiving or getting from the albums.txt 149 00:05:14.350 --> 00:05:16.840 ... so... 150 00:05:16.840 --> 00:05:21.130 ...so we're looking for the ... 151 00:05:21.130 --> 00:05:23.500 artist based on the name attribute which we ...so we're looking for the 152 00:05:23.500 --> 00:05:25.060 talk about extensively in the last video artist based on the name attribute which we 153 00:05:25.060 --> 00:05:29.169 and if the new artist is set to none talk about extensively in the last video 154 00:05:29.169 --> 00:05:30.789 meaning that we weren't able to find it and if the new artist is set to none 155 00:05:30.789 --> 00:05:33.160 in the list already then we're going to meaning that we weren't able to find it 156 00:05:33.160 --> 00:05:36.910 create new artist.... in the list already then we're going to 157 00:05:36.910 --> 00:05:38.740 ... create new artist.... 158 00:05:38.740 --> 00:06:00.880 ... ... 159 00:06:00.880 --> 00:06:05.020 ...and that's that's it ... 160 00:06:05.020 --> 00:06:07.840 so the first part of the function is ...and that's that's it 161 00:06:07.840 --> 00:06:09.700 unchanged the artist class isn't so the first part of the function is 162 00:06:09.700 --> 00:06:11.020 interested in the fact that data is unchanged the artist class isn't 163 00:06:11.020 --> 00:06:12.550 coming from a text file interested in the fact that data is 164 00:06:12.550 --> 00:06:13.990 nor is interested in the fact that it's coming from a text file 165 00:06:13.990 --> 00:06:16.510 red as a tab-delimited list and so load nor is interested in the fact that it's 166 00:06:16.510 --> 00:06:18.849 data as a result continues to be responsible red as a tab-delimited list and so load 167 00:06:18.849 --> 00:06:21.070 for reading the data and splitting it data as a result continues to be responsible 168 00:06:21.070 --> 00:06:22.419 into the correct fields and of course for reading the data and splitting it 169 00:06:22.419 --> 00:06:24.070 that's the code from line into the correct fields and of course 170 00:06:24.070 --> 00:06:28.240 94 to 98 the list of artists belongs that's the code from line 171 00:06:28.240 --> 00:06:30.010 to the main programs so load data also 94 to 98 the list of artists belongs 172 00:06:30.010 --> 00:06:32.830 retains responsibility for creating a to the main programs so load data also 173 00:06:32.830 --> 00:06:34.659 new artist object after checking that retains responsibility for creating a 174 00:06:34.659 --> 00:06:36.250 one doesn't already exist with the new artist object after checking that 175 00:06:36.250 --> 00:06:37.680 code here on line 102 one doesn't already exist with the 176 00:06:37.680 --> 00:06:40.139 that's all it does so everything else code here on line 102 177 00:06:40.139 --> 00:06:41.669 you can see now is delegated to the that's all it does so everything else 178 00:06:41.669 --> 00:06:43.770 artist class by calling ist add song you can see now is delegated to the 179 00:06:43.770 --> 00:06:47.580 method on line 106 and then providing artist class by calling ist add song 180 00:06:47.580 --> 00:06:49.560 it with the fields remaining fields the method on line 106 and then providing 181 00:06:49.560 --> 00:06:51.600 album field the year field in the song it with the fields remaining fields the 182 00:06:51.600 --> 00:06:53.220 field so that it can go ahead and create album field the year field in the song 183 00:06:53.220 --> 00:06:55.680 that at this point we're not interested field so that it can go ahead and create 184 00:06:55.680 --> 00:06:57.389 in how the add song method does that at this point we're not interested 185 00:06:57.389 --> 00:06:59.580 we'll work i know that the song will in how the add song method does 186 00:06:59.580 --> 00:07:01.199 need to be added somehow but the focus we'll work i know that the song will 187 00:07:01.199 --> 00:07:03.840 here is on dealing with artists only a need to be added somehow but the focus 188 00:07:03.840 --> 00:07:05.370 little worried about how add song will here is on dealing with artists only a 189 00:07:05.370 --> 00:07:06.840 function when I get around to coding it little worried about how add song will 190 00:07:06.840 --> 00:07:09.210 until then I'm just gonna call it and function when I get around to coding it 191 00:07:09.210 --> 00:07:11.130 not worry about it so it might seem until then I'm just gonna call it and 192 00:07:11.130 --> 00:07:12.630 strange calling a method that doesn't not worry about it so it might seem 193 00:07:12.630 --> 00:07:14.130 exist and you know of course the strange calling a method that doesn't 194 00:07:14.130 --> 00:07:16.380 program won't work until it does exist but exist and you know of course the 195 00:07:16.380 --> 00:07:17.639 if you think about it it's really no program won't work until it does exist but 196 00:07:17.639 --> 00:07:19.889 different from delegating the repair of if you think about it it's really no 197 00:07:19.889 --> 00:07:22.110 a car to a mechanic you know in other different from delegating the repair of 198 00:07:22.110 --> 00:07:23.789 words I don't need any idea what the a car to a mechanic you know in other 199 00:07:23.789 --> 00:07:25.110 mechanic will do it don't need to be a words I don't need any idea what the 200 00:07:25.110 --> 00:07:27.389 mechanic and I don't need to understand how to fix mechanic will do it don't need to be a 201 00:07:27.389 --> 00:07:29.430 a car I just know that the car needs mechanic and I don't need to understand how to fix 202 00:07:29.430 --> 00:07:30.419 fixing a car I just know that the car needs 203 00:07:30.419 --> 00:07:32.580 so I can call my mechanic and say fix fixing 204 00:07:32.580 --> 00:07:35.610 the car and I do say hello first and please so I can call my mechanic and say fix 205 00:07:35.610 --> 00:07:38.220 afterwards of course but basically it the car and I do say hello first and please 206 00:07:38.220 --> 00:07:39.750 boils down to it I'm calling my afterwards of course but basically it 207 00:07:39.750 --> 00:07:42.630 mechanics fix_car method and boils down to it I'm calling my 208 00:07:42.630 --> 00:07:44.610 hopefully i'm pretty confident that when mechanics fix_car method and 209 00:07:44.610 --> 00:07:47.370 the car returns it will be fixed so I'm hopefully i'm pretty confident that when 210 00:07:47.370 --> 00:07:48.960 sure you agree that looking at this code the car returns it will be fixed so I'm 211 00:07:48.960 --> 00:07:51.240 now it's fast simple then my previous sure you agree that looking at this code 212 00:07:51.240 --> 00:07:53.580 version as a result much easy to now it's fast simple then my previous 213 00:07:53.580 --> 00:07:55.860 understand and in fact creating a version as a result much easy to 214 00:07:55.860 --> 00:07:58.020 flowchart this would probably be totally understand and in fact creating a 215 00:07:58.020 --> 00:07:59.849 over-the-top because the code that we've flowchart this would probably be totally 216 00:07:59.849 --> 00:08:01.949 got now in our load data over-the-top because the code that we've 217 00:08:01.949 --> 00:08:03.750 function pretty much document got now in our load data 218 00:08:03.750 --> 00:08:06.570 itself so now that the main program has function pretty much document 219 00:08:06.570 --> 00:08:08.159 been written it's time to focus on the itself so now that the main program has 220 00:08:08.159 --> 00:08:10.380 details of that adds song method that were been written it's time to focus on the 221 00:08:10.380 --> 00:08:12.720 calling on line 106 so what details of that adds song method that were 222 00:08:12.720 --> 00:08:14.400 we'll do is we'll create that method calling on line 106 so what 223 00:08:14.400 --> 00:08:17.009 first and then explain what it's doing we'll do is we'll create that method 224 00:08:17.009 --> 00:08:18.990 let's go back up to the artist class first and then explain what it's doing 225 00:08:18.990 --> 00:08:20.280 that we have defined the code for that let's go back up to the artist class 226 00:08:20.280 --> 00:08:22.440 we're going to add this method now that we have defined the code for that 227 00:08:22.440 --> 00:08:24.630 this add song after the add album we're going to add this method now 228 00:08:24.630 --> 00:08:27.479 method so add here... this add song after the add album 229 00:08:27.479 --> 00:08:30.030 ... method so add here... 230 00:08:30.030 --> 00:09:49.230 ... ... 231 00:09:49.230 --> 00:09:51.750 ok so that's our doc string for this ... 232 00:09:51.750 --> 00:09:54.360 method so let's start by writing it i'm ok so that's our doc string for this 233 00:09:54.360 --> 00:09:55.440 just gonna move this up a little bit so method so let's start by writing it i'm 234 00:09:55.440 --> 00:09:57.660 you can see more of the screen so we're just gonna move this up a little bit so 235 00:09:57.660 --> 00:09:59.520 gonna start I will actually type you can see more of the screen so we're 236 00:09:59.520 --> 00:10:00.540 it out then we'll talk about a little gonna start I will actually type 237 00:10:00.540 --> 00:10:04.140 bit more so... it out then we'll talk about a little 238 00:10:04.140 --> 00:10:06.930 ... bit more so... 239 00:10:06.930 --> 00:11:16.270 ... ... 240 00:11:16.270 --> 00:11:19.300 ok so hopefully the doc string that i ... 241 00:11:19.300 --> 00:11:22.360 added on line 82 really says all that ok so hopefully the doc string that i 242 00:11:22.360 --> 00:11:24.670 needs to be said so add_song uses added on line 82 really says all that 243 00:11:24.670 --> 00:11:26.410 the name of the album to check if an album needs to be said so add_song uses 244 00:11:26.410 --> 00:11:27.820 is already present in the list of the name of the album to check if an album 245 00:11:27.820 --> 00:11:30.490 albums and then create a new album if it is already present in the list of 246 00:11:30.490 --> 00:11:32.620 isn't or if it doesn't exist in other albums and then create a new album if it 247 00:11:32.620 --> 00:11:33.910 words it's not present the list of isn't or if it doesn't exist in other 248 00:11:33.910 --> 00:11:36.040 albums anything else that needs to be words it's not present the list of 249 00:11:36.040 --> 00:11:37.959 done is been delegated to the album's albums anything else that needs to be 250 00:11:37.959 --> 00:11:40.060 to the album class add song method done is been delegated to the album's 251 00:11:40.060 --> 00:11:42.970 the artist class knows about albums so to the album class add song method 252 00:11:42.970 --> 00:11:45.430 it deals with the album part it doesn't the artist class knows about albums so 253 00:11:45.430 --> 00:11:46.870 know about songs that's left to the it deals with the album part it doesn't 254 00:11:46.870 --> 00:11:48.760 album class to deal with know about songs that's left to the 255 00:11:48.760 --> 00:11:50.380 once again I don't care what the album album class to deal with 256 00:11:50.380 --> 00:11:52.480 classes add song method does at this once again I don't care what the album 257 00:11:52.480 --> 00:11:54.370 stage I just know i'm going to call it classes add song method does at this 258 00:11:54.370 --> 00:11:56.230 and let the album class handle what stage I just know i'm going to call it 259 00:11:56.230 --> 00:11:59.200 happens and you saw me add print and let the album class handle what 260 00:11:59.200 --> 00:12:00.430 statements here so that we can see happens and you saw me add print 261 00:12:00.430 --> 00:12:01.690 what's happening when we come to run the statements here so that we can see 262 00:12:01.690 --> 00:12:03.730 program but the rest of the code again what's happening when we come to run the 263 00:12:03.730 --> 00:12:05.470 once again pretty much document itself program but the rest of the code again 264 00:12:05.470 --> 00:12:07.720 so i'm going to finish the video here once again pretty much document itself 265 00:12:07.720 --> 00:12:10.029 now I don't know why I added a semi colon at so i'm going to finish the video here 266 00:12:10.029 --> 00:12:12.310 the end by the way wrong programming language now I don't know why I added a semi colon at 267 00:12:12.310 --> 00:12:15.010 so I'm going to finish the video here in the the end by the way wrong programming language 268 00:12:15.010 --> 00:12:16.570 next video we'll come back and will so I'm going to finish the video here in the 269 00:12:16.570 --> 00:12:19.240 implement the album class add song method next video we'll come back and will 270 00:12:19.240 --> 00:12:21.459 so that we can delegate the task of implement the album class add song method 271 00:12:21.459 --> 00:12:24.430 dealing with the song to that method so so that we can delegate the task of 272 00:12:24.430 --> 00:12:30.300 see you in the next video dealing with the song to that method so