"Hello, my young friend! I didn't expect to see you again so soon. What do you have to tell me? What did you learn this time?"
"I learned about class relationships, encapsulation, and inheritance. They told me I'm a good student!"
"That's great! I'm glad you're making progress because you're studying my lessons."
"I'm not just learning — I'm also completing tasks!"
"Of course, Amigo. There's another level ahead of you — a level dedicated to the basics of OOP. Before you run back to Ellie, Rishi, Kim, and your friend Diego, sit for a spell in our space library and read a few articles. I'm sure you'll find they contain a lot useful information."
"Okay, Professor. What have you got for me today?"
Relationships between classes. Inheritance, composition, and aggregation
In programming, you'll quickly understand how important it is not to write extra code. Fortunately, Java has everything you need to make elegant "cuts". This lesson presents a visualization of the following class relationships: inheritance, composition, and aggregation. Get ready: you'll see a lot of interesting examples.
Principles of encapsulation
Encapsulation and information hiding — are these different concepts or the same thing? In its basic form, you've encountered encapsulation more than once. If you want to know how to hide the complexity of your program from the user, leaving only an easy-to-use interface, I recommend that you read this lesson carefully.