Object Oriented Programming Flashcards

1
Q

What is object oriented programming

A

OOP is a computer programming model that organizes software design around data, or objects rather than functions and logic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the basic conepts of OOP

A

Objects
Classes
Data abstraction
Data encapsulation
Inherintance
Polymorphism
Dynamic binding
Message passing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a class

A

Classes is a blueprint or template from which objects are created.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Mention the types of access specifiers

A

Private
Public
Protected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a private member

A

A private member of a class means that it can only be accessed within other members of the same class.
In other words the member can’t be accessed or viewed from anywhere outside the class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a public member

A

This means the members are accessible from anywhere from outside or within the class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a public member

A

This means the members are accessible from anywhere from outside or within the class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a protected member

A

This means the members can only be accessed from members within the same class AND inherinted classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an object

A

An object is an instantiation of a class. It is an entity that has state and behaviours

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Object is said to have state and behaviour. What do those terms mean – state & behaviour

A

state means data
behavior means functionality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are methods

A

Methods are functions that belongs to a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a constructor

A

A constructor is a special member function have the same name as that of its class. It is called automatically when an object is created.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is encapsulation

A

Encapsulation is the idea of keeping sensitive data in one place and restricting access from outside the class. In other words making sure sensitive data is hidden from users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is inherintance

A

This is a feature in OOP where a class can inherit attributes and methods from another class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the difference between a base class and derived class

A

Base class(parent): the class being inherited from.

Derived class(child): the class that inherits form another class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly