In the current lesson, you will learn the four pillars of Object-Oriented Programming (OOP).
Svetlin Nakov will explain to you what are the four main OOP Principles. He talks about the concepts of encapsulation, inheritance, abstraction, and polymorphism. Later, you will learn how to compare different objects in Java using equals() and compareTo() methods. Make sure that you understand everything since this is one of the most important topics in the programming world!
You will find many helpful examples and exercises, so make sure to practice what you’ve learned!
As always, we advise you to pause the video right before the solving part of each problem and try to do the exercises on your own first. Then, if you have difficulties, just watch the provided solutions in the video.
*The exercise descriptions are to be found in the PDF document at the end of this post.
Lesson Topics
1. Principles of OOP
- Encapsulation
- Inheritance
- Abstraction
- Polymorphism
2. Comparing Objects in Java
- Using equals() and compareTo() methods
- Defining equals() and compareTo()Â methods
Practical Exercises
Watch the video and solve the problems. To better understand the material, do the coding exercises and implement the knowledge you acquired. Writing code is the only way to master the skill of code.
Submit your code in the SoftUni Judge System: