Unit 2 Flashcards

1
Q

Define Data

A

Information that is stored in some specific format.

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

Define a Data Structure

A

A particular way of formatting or organising data.

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

Define an Algorithm

A

A specification of a computational process.

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

Define an Architecture

A

The overall structure of a computer program in terms of its component algorithms and data.

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

Define an Application

A

A piece of software that provides one or more useful functions.

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

5 Main types of data format

A
  • Binary digits (0, 1)
  • Numbers, characters
  • Sequences of numbers, strings
  • Complex data structures: lists, dictionaries, sets, trees
  • Structured data objects - CSV files, standard formats for images, video, audio, etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define Encapsulation

A

An important concept in computer programming. It arises from the idea that a component of a computer program should be usable without a programmer needing to know all the details of how it works.

Although within the component may be a complex implementation, the programmer can use it by just passing it certain information (e.g. the arguments of a function call) and can rely on it computing results according to a specification of what it should do.

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

Modularity

A

The concept that the functionality of a computer program should be broken down into independent modules.

Creating smaller and simpler pieces of functionality means that each one can be understood by a programmer more easily.

The parts can then be used together like building blocks to create large, complex systems.

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

Object-oriented programming

A

A way of structuring code.

Related variables and functions are collected together into classes.

A class is instantiated to create an object.

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

Class attributes

A

Variables belonging to the class.

A class attribute has the same value across all objects that instantiate the class.

E.g. a Person class might have class attributes for species with the value ‘homo sapiens’

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

Instance attributes

A

Variables representing traits that objects have.

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

Static method

A

A method in a class that does not get the “self” parameter passed in and which therefore does not have access to any of the instance attributes of the object.

This means that the method will give the same result for any object.

Defined using the @staticmethod decorator.

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

Inheritance

A

Inheritance allows a class to include methods and attributes of another class.

The original class is often called the parent class and the new class that inherits methods and attributes from the other is called the child class.

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