Topic 05 – Continued.. Object Oriented Programming (OOPs) in C++

15 flashcardspar Clement
Réviser ces flashcardsGratuit · répétition espacée · iPhone, Android, Mac et web

Toutes les cartes

1
What is the main difference between procedural programming and object-oriented programming?
Procedural programming focuses on functions and data, while object-oriented programming focuses on objects containing both data and functions.
2
What is the DRY principle in programming?
The DRY (Don't Repeat Yourself) principle is about reducing code repetition by extracting common code and reusing it.
3
What is a class in C++?
A class is a template for objects, defining attributes and methods that can be inherited by objects.
4
What is an object in C++?
An object is an instance of a class that can access its attributes and methods.
5
What are attributes and methods in a class?
Attributes are variables, and methods are functions that belong to a class.
6
What is encapsulation in OOP?
Encapsulation is the process of wrapping data and functions together in a single unit and hiding the details from outside access.
7
What is abstraction in OOP?
Abstraction is the concept of displaying only essential information and hiding the background details or implementation.
8
What is polymorphism in C++?
Polymorphism is the ability of a function or operator to have multiple forms, such as function overloading and operator overloading.
9
What is operator overloading in C++?
Operator overloading is the process of making an operator behave differently based on the type or number of operands.
10
What is function overloading in C++?
Function overloading allows multiple functions to have the same name but with different parameters.
11
What is inheritance in OOP?
Inheritance is the capability of one class (subclass) to derive properties and behaviors from another class (superclass).
12
What is the benefit of inheritance in OOP?
Inheritance supports reusability, allowing new classes to reuse code from existing classes.
13
What are access specifiers in C++?
Access specifiers (public, private, protected) define the visibility of class members from outside the class.
14
What is an example of abstraction in C++?
An example of abstraction is using header files like math.h, where functions like pow() are used without knowing their internal algorithm.
15
What is the purpose of a constructor in a class?
A constructor is used to initialize the variables of a class when an object is created.
Réviser les 15 cartes gratuitement

Plus de flashcards : Informatique

Windows Command Prompt Modifiers33 cartesInformatique · Anglaisun étudiant OutLearnCS3258 decks · 132 cartesInformatiqueClementForecast: The basics21 cartesInformatique · AnglaisBriannaThe File System and Its Problems16 cartesInformatique · Anglais—Griffith—Security Controls10 cartesInformatique · AnglaisYasmeenANetworking Fundamentals Module 1-7218 cartesInformatique · AnglaisDiandreiComputer Architecture Exam 1117 cartesInformatique · AnglaisCarterNetwork Security: OSPF Routing Protocol83 cartesInformatique · AnglaisDiandreiA+ Core 1 Domain 2 Acronyms68 cartesInformatique · AnglaisatalnagiCNIT242 Exam 357 cartesInformatique · AnglaisAydenSection 3.1: Cables and Adapters46 cartesInformatique · AnglaispzxliCS 159 Lab 440 cartesInformatique · AnglaisRusty

Tous les decks : Informatique

Révise ces decks dans l’app

Gratuit sur iPhone, Android, Mac et le web. Ajoute n’importe quel deck à ton compte en un tap.

Télécharger dans l’App StoreDisponible sur Google Play
Réviser les 15 cartes gratuitement