Software Engineering Flashcards

1
Q

What are the four principles of object oriented programming?

A

Encapsulation
Abstraction
Inheritance
Polymorphism

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

Describe encapsulation

A

In object-oriented programming encapsulation is where an object maintains a private state within a class. Other objects can only access publicly declared functions. The class is said to encapsulate its internal state.

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

Describe abstraction

A

In object-oriented programming abstraction is the process of removing physical, spatial, or temporal details or attributes in the study of objects or systems to focus attention on details of greater importance.

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

Describe inheritance

A

In object-oriented programming inheritance is a form of reuse in which a child class inherits the properties and functionality of its parent. A class is said to sub-type the super-type.

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

Describe polymorphism

A

Polymorphism is an object-oriented programming concept that refers to the ability of a variable, function or object to take on multiple forms. A language that features polymorphism allows developers to program in the general rather than program in the specific.

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

What is a covariant type?

A

A covariant type can be overridden with a more derived (subclassed) type.

For example, you can write a method in the Asset class that returns an Asset, and override that method in the House class such that it returns a House.

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

What is a Lambda Expression?

A

A lambda expression is an unnamed method written in place of a delegate instance.

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

What is a Fluent API?

A

In software engineering, a fluent interface is an object-oriented API whose design relies extensively on method chaining. Its goal is to increase code legibility by creating a domain-specific language (DSL). The term was coined in 2005 by Eric Evans and Martin Fowler.

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

What are the three principles of a Fluent API?

A

1) Defined through the return value of a called method
2) Self-referential, where the new context is equivalent to the last context
3) Terminated through the return of a void context

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

What is software entropy?

A

An increase in the amount of disorder in a system. Often accumulating over time due to increased complexity and poor architecture decisions.

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