Skip to content

In this project you can find the principles of oop and exercises related to oop.

Notifications You must be signed in to change notification settings

EnesSERENLI/Object_Oriented_Programming

Repository files navigation

Object_Oriented_Programming

Object Oriented Programming is a form of programming in which every function is abstracted objectively.

It is the way many objects we see in real life are transferred to the computer environment. In other words, the display of many features such as the color, condition, name, year of manufacture of an object in a computer environment can be given as an example.

We can create the object we need within the application. We don't have to write the object we created all the time. We can create as many as we want by taking an instance over the prototype.

What are the advantages of OOP ?

  • It provides Reusability, Extensibility, Sustainability.
  • Object creation is collected in a class and allows usability in all projects.
  • Thanks to the creation of classes once, they can be run with short codes instead of rewriting long codes.
  • The development process is shortened by avoiding rewriting long code.
  • Since the objects are independent of each other, it provides an advantage in terms of information confidentiality.
  • Thanks to classes, instead of making changes in all projects, changes are made in a single class and it works in all projects. This greatly reduces the waste of time.

OOP has 4 basic principles

1- Encapsulation (Kapsülleme)
2- Inheritance (Kalıtım/Miras)
3- Polymorphism (Çok Biçimlilik)
4- Abstraction (Soyutlama)

In addition to these principles, Interfaces should also be known.

Access Modifiers (Erişim Belirteleri)

Keywords that determine whether a class or elements of a class can be accessed.

  • private => It can only be accessed from within the class it belongs to.
  • internal => It can only be accessed from within the project it is linked to.
  • public => Accessible from anywhere.
  • protected => It can be accessed only in the class in which it is defined or from classes that inherit that class.
  • protected internal => Defining the difference with Protected does not have to be in the same project.

You can access the exercises in the repository from the links below.

1- Class-Constructor
2- Encapsulation
3- Inheritance
4- Polymorphism
5- Static Classes
6- Abstraction
7- Interface
8- OOP-ECommerce-Example