CompSci - Principles Of Programming Flashcards

(24 cards)

1
Q

BNF Notation

A

<> Encloses each element that can be broken down further

::= Defines the parameters for a previous element

|OR

<name> ::= <firstname> <lastname>
<firstname> ::= John | Michael
</firstname></lastname></firstname></name>

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

BNF Recursion

A

<string> ::= <letter> | <letter> <string>
</string></letter></letter></string>

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

Standardisation Benefits

A

Portability
Documentation
Maintenance
Employment
Development

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

Standardisation - Portability

A

Programs that use a standard will not need to be modified to run on different OS or hardware.

Standards cannot be biased towards particular software or hardware for this reason.

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

Standardisation - Documentation

A

Standardised documentation protocols ensure that developers or programmers can learn how to use a program and how it works.

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

Standardisation - Maintenance

A

A program can be bugfixed or otherwise maintained by anyone familliar with the standard.

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

Standardisation - Employment

A

Programmers that are able to use a programming standard can apply their skills at any job that uses that standard.

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

Standardisation - Development

A

Once a standard is defined, it can be used to develop other programs.

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

Unambiguous Syntax

A

Allows for flexible use of the language and a less steep learning curve. Homophones are an example of ambiguities.

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

Procedural Paradigm

A

Sequence of instructions that are performed consecutively as defined by the programmer.

Python, C

Uses sequence, selection, iteration, functions and procedures.

Used for algorithms.

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

Visual Paradigm

A

Allows for drag and drop of simple functions and conditions.

Scratch, Game Maker

Used for learning

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

Event-Driven Paradigm

A

Set of functions that are run when a user interaction is detected while the program sits in a loop.

C#, VB

Uses listener & callback functions

Used for games

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

Mark-Up Paradigm

A

Communicates with browsers to structure text & other elements.

HTML, LaTeX

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

Declarative Paradigm

A

Finds whether a task can be achieved based on facts and relationships between those facts.

Functional and logic

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

Functional Declarative Paradigm

A

Uses mathematical expressions to evaluate a problem that the programmer raises.

SQL, Wolfram

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

Logic Declarative Paradigm

A

Solves a problem based on a knowledge base.

PROLOG, Mercury

17
Q

Object-Oriented Paradigm

A

Models things as classes with attributes.

Uses inheritance & encapsulation
C++, Java

18
Q

OOP Object

A

An iteration of a class with some defined attributes & methods

19
Q

OOP Instance

A

Location in memory of an object

20
Q

OOP Encapsulation

A

All data & functionality in a program being held within classes, making it much more dynamic.

Attributes can be:
- Private, only accessible via methods of the same class
- Protected, only accessible via methods of the same class & subclasses
- Public, accessibly by any method of any object

21
Q

Truncation

A

Removes the least significant bits up to a specified point.

22
Q

OOP Method

A

A function that operates on objects of a class

23
Q

OOP Class

A

A digital template of a real-life thing

24
Q

Standardisation Difficulties In Implementation

A

Inflexible
Conflicting interests of vendors and developers
Backward compatibility not assured
Training
Limited optimisation