1 00:00:00,310 --> 00:00:03,268 Let me tell you about a useful concept that you can use to organize your 2 00:00:03,268 --> 00:00:08,773 classes effectively. It's called the concept of coupling. And we'll say that a 3 00:00:08,773 --> 00:00:12,982 class is coupled with another if it uses the other class. In fact, 4 00:00:12,982 --> 00:00:13,628 [INAUDIBLE] 5 00:00:13,628 --> 00:00:19,154 shows us this relationship, with these arrows that you may have noticed before. 6 00:00:19,154 --> 00:00:24,478 In this example, the Car class. Is coupled with a Person class, because the 7 00:00:24,478 --> 00:00:29,610 code of the Car class uses personal objects. But the Person class is not 8 00:00:29,610 --> 00:00:34,164 coupled with the Car class because the personal object actually knows nothing 9 00:00:34,164 --> 00:00:39,771 about cars. Let me show you. When you look at the code of the Person class 10 00:00:39,771 --> 00:00:44,049 you'll see there are no cars inside, but when you look at the code for the Car 11 00:00:44,049 --> 00:00:52,300 class, there's a person here, and a Person class is used up here. Like I said, 12 00:00:52,300 --> 00:00:55,756 the Car class knows about the Person class, but the Person class doesn't know 13 00:00:55,756 --> 00:01:00,119 about the Car class. It's a good idea if not every class knows about every 14 00:01:00,119 --> 00:01:04,965 other, it makes it easier to make changes. For example, if we make a change in 15 00:01:04,965 --> 00:01:10,284 the Car class, the Person class doesn't care. It never knew the class in the 16 00:01:10,284 --> 00:01:15,610 first place. One wants to keep the coupling between classes as low as possible. 17 00:01:15,610 --> 00:01:20,740 Let's see what other classes the Car class might be coupled with. Go ahead, go 18 00:01:20,740 --> 00:01:25,814 through the code of the Car class, and give me a list of all of the classes 19 00:01:25,814 --> 00:01:32,610 that the Car class uses. Just put the names of the classes into this box.