Programming Language Flashcards

1
Q

High-level languages

A

Designed to allow humans to write computer programs and interact with a computer system without having specific knowledge of the processor or hardware.
Use command words and syntax which reflect everyday language making it easier to learn and use.
Offer the programmer libraries and built-in functions

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

Characteristics of high-level languages

A

~Syntax that is easy for humans to understand
~Command words similar to natural human language
~A single line can accomplish multiple tasks
~Allow the programmer to focus on what the program is trying to achieve rather than how the hardware operates
~Source code is translated into machine code for the computer to process

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

Advantages of high-level languages

A

Easier to read and write
Portable
Libraries of functions
Pre-written code

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

Imperative languages

A

Programmers will solve a problem by writing a set of instructions that state how a problem should be solved.
Eg C, python

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

Declarative languages

A

Define what what should be achieved by the program rather than how to solve a problem.
Also known as domain-specific languages (DSL).
User declares the problem to be solved without having to know how the solution is executed.
Eg SQL

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

Object-oriented languages

A

Programmers use classes to define objects in order to model the problem to be solved.
Involves modular design.

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

Encapsulation

A

The state of an object is private, and other objects can only interact with the object’s public methods.

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

Inheritance

A

Subclasses can inherit properties and methods from one or more parent class.

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

Polymorphism

A

The ability of an object to take on many different forms. Specifically for a method with the same name to have many different implementations.

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

Immediate addressing

A

The operand specifies a value

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

Direct addressing

A

The operand specifies the address of a memory location.

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

Indirect addressing

A

Operand specifies the address of a memory location which holds the address of another memory location.

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

Indexed addressing

A

The operand specifies the address. The contents of the index register is added to the address to determine a second address.

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

Attribute

A

A data item that helps define or describe the object eg variables

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

Class definition

A

A blueprint that defines the properties of all objects on the same type.
Each object is one of a group of similar objects, and you define the group as a class. The class definition will describe every object of that type.

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