Chapter 26 Further programming Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What do we mean by programming paradigm? Give some examples.

A
It is a style of programming. A way of approaching the programming goal. Examples:
Low-level programming paradigm
Imperative programming paradigm
Object oriented programming paradigm
Declarative programming paradigm
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A programming paradigm is linked to one program?

A

No it is not linked, a program can support several programming paradigms.

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

Describe low level programming paradigm.

A

It will modify directly the memory addresses of a given processor. Each different type of processor has it’s own programming language. Processor families can use similar programming languages (for example Intel family).

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

Describe Imperative programming paradigm.

A

Imperative means kötelező.
The programmer will write a sequence of steps that are then executed by the processor.
Examples: Pascal, C, Basic.

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

What is the main difference between Imperative programming paradigm and Declarative programming paradigm?

A

The approach is different, the Imperative programming paradigm tells the computer how to get to the desired result, Declarative programing will describe what the desired result should be.

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

Describe Object oriented programming paradigm

A

It is based on objects that are interacting with each other.
Python, Java were built from the beginnig as object oriented, Basic, Pascal, evolved to be object oriented.

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

Describe Declarative programming paradigm

A

Are described as formal logic instructions. It is common with database handling programs (SQL, Prolog).

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

What is a random file?

A

A file that stores records in specific addresses and can be accessed directly.

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

What is the pseudocode for:

  1. Create a file and open int for writing
  2. Open file for reading
  3. Open file for random access
  4. Close file
  5. Write a record to a file
  6. Read a record from a file
  7. Move to a specific disc address with the file
  8. Test for end of file
A
  1. OPENFILE FOR WRITE
  2. OPENFILE FOR READ
  3. OPENFILE FOR RANDOM
  4. CLOSEFILE
  5. PUTRECORD ,
  6. GETRECORD ,
  7. SEEEK , <address>
  8. EOF () </address>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the difference between Arrays and records

A

Arrays are built-in structures, the programmer chooses only the dimensions when declaring a variable of type array.
Records are user defined variable types. The programmer will first declare the record type (structure), then he will declare the variable with this record type.

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

Present the 2 methodes to write data in a file. Name the files types based on the methode

A
  1. Serialised files: data is written in one after the other in the file, que.
  2. Random file: data is linked to the memory addresses of the file, acces is also through the addresses.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Name 2 different Methode library. Which is the more widley used and why

A

Pickle, JSON.
JSON is more used because:
- the generated file is human readable
- is not platform dependante. Pickle can be used only with Python.

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

What are records?

A

User-defined types

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

Which are the ways in which you can save records?

A

Serial
Sequential
Random

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

Why is exceptional handling used?

A

To avoid run-time errors

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

How are Pascal and VB.NET executed?

A

First they are compiled by a compiler and then executed

17
Q

Whith what is Python executed?

A

An interpreter