In the current lesson, you will learn the foundations of Object-Oriented Programming (OOP).
Svetlin Nakov will go over the topics of defining simple classes, conventions, and best practices in doing so, creating objects of these classes, object references, and what is the difference between an object and a class.
Later on in the lesson, you will become familiar with data fields and access modifiers, and of course – constructors, getters, and setters, which are the building blocks of every class. By the end of the lesson, you will also have a good understanding of the term static, which you’ve surely encountered multiple times so far.
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. Defining Simple Classes
- Creating objects
- Using classes
2. Fields
- Class data
- Access modifiers
3. Methods
- Getters
- Setters
- ToString()
4. Constructors
- The keyword this
5. Static Members
- Static methods and fields
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: