Software Engineering Flashcards
What are the four principles of object oriented programming?
Encapsulation
Abstraction
Inheritance
Polymorphism
Describe encapsulation
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.
Describe abstraction
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.
Describe inheritance
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.
Describe polymorphism
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.
What is a covariant type?
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.
What is a Lambda Expression?
A lambda expression is an unnamed method written in place of a delegate instance.
What is a Fluent API?
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.
What are the three principles of a Fluent API?
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
What is software entropy?
An increase in the amount of disorder in a system. Often accumulating over time due to increased complexity and poor architecture decisions.