Programming Concepts Flashcards

1
Q

What are the four principles of Object-Orientated Programming?

A

The four main principles of OOP is encapsulation, abstraction, polymorphism, and inheritance.

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

Explain what Encapsulation is in Object-Orientated Programming?

A

Encapsulation refers to the bundling of data and behaviours into a single unit. A class is an example of encapsulation in that it consists of data and methods that have been bundled into a single unit. Encapsulation also allows for direct access of components within the object to be restricted, such as state values for the variables in the object.

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

What is Abstraction in Object-Orientated Programming?

A

Abstraction is where irrelevant data about an object is hidden. This helps to reduce complexity by only presenting a specific selection of data and behaviours, that are specific to a particular use of the originating entity.

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

What’s the main difference between encapsulation and abstraction in Object-Orientated Programming?

A

Abstraction focuses on the observable behaviour of an object, whilst encapsulation focuses on the implementation that gives rise to this behaviour.

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

What is Polymorphism in Object-Orientated Programming?

A

Polymorphism allows to you replace, by method overriding, the implementation of inherited public and protected methods.

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

What is the effect of using the ‘final’ word keyword in variables, methods, and classes.

A

In variables, using the keyword final makes the variable constant, which means that its value cannot be changed. The keyword final in methods prevents method overriding in subclasses, whilst in classes it prevents inheritance of the class.

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

What is inheritance in Object-Orientated Programming?

A

Inheritance is where classes can inherit properties and behaviours from parent or super classes, which helps to create a hierarchy of classes that share a set of attributes and methods.

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

What are microservices?

A

Microservices is an architectural style that structures an application as a collection of services that are highly maintainable and testable, loosely coupled, independently deployable, and organised around business capabilities.

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

What is a REST API?

A

A REST API is an application programming interface that conforms to the contraints of the REST architectural style and allows for interaction with RESTful web services.

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

What does REST stand for?

A

REST stands for Representational State Transfer.

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

What does JSON stand for?

A

JSON stands for JavaScript Object Notation.

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

What are the basic steps for connecting to a database?

A

First you need to register the driver class (if using java), create a connection, execute a query, then close the connection if needed.

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