SLR 3 - Programming paradigms Flashcards

1
Q

What is a paradigm?

A

a way of thinking

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

What are the three different types of programming language? + examples

A
  • procedural (Pascal, Python, c)
  • object orientated (C++, Java)
  • assembly
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Turing complete?

A

A computing language which is able to solve all problems a computer is able to solve.

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

What do procedural languages entail?

A
  • instructions
  • sequence, selection and iteration
  • interaction
  • procedures and functions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What do object orientated languages entail?

A
  • objects are modelled on real world
  • objects interact
  • inheritance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What do assembly languages languages entail?

A
  • mnemonics
  • processor specific
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does a class diagram look like?

A
  • a rounded rectangle separated into 3 sections
  • section 1 = class name
  • section 2 = attributes
  • section 3 = methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is instantiation? e.g.,

A

the process of creating an object from a class template
e.g., person1 = new Person(“Dylan”, “Cheese”)

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

What key word links to the constructor?

A
  • ‘new’
  • this will be in you class code and runs when an object of this class type is created
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is inheritance?

A
  • Reuses and extends code from the original class within a new one
  • It uses the attributes and methods from the previous class but can contain additional attributes and methods.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the classes called during inheritance?

A
  • the original class becomes the superclass
  • the calls which inherits is called the subclass
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does ‘.super’ do?

A

Overrides the inheritance and takes the value in the attribute from the superclass

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

What is the key piece of code that needs to go into the subclass when its created?

A

class employee ‘inherits’ person

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