Concepts Flashcards

1
Q

Interfaces

A

Within object-oriented design, interfaces provide layers of abstraction that simplify code and create a barrier preventing coupling to dependencies.

A system may become so coupled at multiple levels that it is no longer possible to make a change in one place without necessitating many additional changes.[1] Using an interface or an abstract class can prevent this side effect.

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

Encapsulation

A

In object-oriented programming, encapsulation refers to the bundling of data with the methods that operate on that data, or the restricting of direct access to some of an object’s components.

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

what are the four main theoretical principles of object-oriented programming.

A

Abstraction, encapsulation, polymorphism, and inheritance are the four main theoretical principles of object-oriented programming.

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

L

A

Liskov substitution principle. (srp)

A class that inherits from a base class, should be able to be used as if it was the base class.

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

C# Abstract Classes/methods

A
C# Abstraction
Abstract class: is a restricted class that cannot be used to create objects (to access it, it must be inherited from another class).
Abstract method: can only be used in an abstract class, and it does not have a body. The body is provided by the derived class (inherited from).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

delegates

A

Delegates are, essentially, function containers.

They allow you to store and call a function as if it were a variable.

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

Events

A

Events are like a notificaton that are sent out to Listeners/Subscribers who can than act on those event.

Events in Unity are a special kind of multicast delegate and, generally speaking, they work in the same way as regular delegates. However, while delegates can be called by other scripts, event delegates can only be triggered from within their own class.

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

Asynchronous programming

A

C# has a language-level asynchronous programming model, which allows for easily writing asynchronous code without having to juggle callbacks or conform to a library that supports asynchrony. It follows what is known as the Task-based Asynchronous Pattern (TAP).

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