OOP Flashcards
Why do we need to use OOP?
- It allows us to simplify a complex system.
What is an object?
It’s an abstract data type created by a developer. It can include multiple properties and methods.
What is class?
A class is a blueprint(план) or prototype that defines the variables(properties) and the methods (functions) common to all objects of a certain kind.
What kind of hierarchy do you know?
- part of ( Engine part of a car ) ( Целое/ Часть)
- is a ( Cat is a animal )( Общее частное)
What is decomposition?
Breaking down a complex problem or system into smaller parts that are more manageable and easier to understand.
What is object oriented programming?
Object-oriented programming (OOP) is a programming paradigm based on the concept of “objects”, which can contain data (attributes or properties), and procedures (often known as methods).
Object-oriented programming (OOP) is about encapsulating data and behavior into objects
What is Procedural Programming?
Is a programming paradigm based upon the concept of the procedure call. Procedures, also known functions, simply contain a series of computational steps to be carried out.
It is about writing a list of instructions to tell the computer what to do step by step
What is Functional programming?
Is a programming paradigm — a style of building the structure and elements of computer programs — that treats computation as the evaluation of mathematical functions and avoids changing state and mutable data.
Functional programming (FP) is about passing data from function to function to function to get a result. Functions in FP have to be pure functions, they should avoid shared state, and side effects and data should be immutable
What are the base OOP concepts?
- Abstraction
- Inheritance
- Polymorphism
- Encapsulation
What is Polymorphism?
You can also think of polymorphism as the ability of an object to “pretend” to be something else, usually a class it extends or an interface it implements. In our example, the dogs and cats in the bag were pretending to be generic animals.