3.4 Principles Of Programming Flashcards

1
Q

Procedural Programming

A

Code is divided into procedure which are discrete blocks of code that carry out single tasks. Best suited for problems that require a linear algorithm solution (solve step by step)

Examples:
- Basic, Java, Python

+ Ease of learning
+ Portable
+ Various applications can be used
+ flows lineraly so easy to follow

  • cant solve real world problems
  • less secure as there is no security of data
  • semantics are hard to understand
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Event Driven

A

Execution of program is determined by events such as actions or messages. Suited for problems that rely on heavy interaction through GUI (buttons execute subroutine on click for instance)

Examples
- Javascript with buttons and events

+ enables multitasking
+ critical for real time applciations
+ flexibility

  • complexity
  • less logical and obvious
  • difficult to find errors
  • debugging difficutlies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Visual

A

Coding approach that uses graphical elements to create software

Examples:
- Scratch

+ user friendly
+ improved debugging
+easy to learn

  • require more memory due to graphic use
  • limited functions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Mark-Up

A

Used to structure and format text documents using symbols and tags.

Examples:
- HTML, XML

+ support from every browser
+integrates with other languages
+ easy to code

  • static language
  • security features are limited
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Database

A

Stores information that can be easily stored and managed

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

flat file and relational databases

A

Flat file - Stores data in a single table

Relational database - uses multiple tables that are connected by relationships, removes redundant data

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

What is a programming paradigm

A

describes different approaches in programming languages that are used to solve problems more effectively.

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

OOP

A

OOP utilise real world concepts of objects and how they interact with each other. They consist of attributes (characteristics) and methods (features). It follows principles allowing for reusable and maintainable code.

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

Relationship with object, classes, methods and instances

A

a class is simply like a blueprint for an object. An object is then made from this class and the instances is a variables that holds this objects memory address. Methods of the object defines it behaviour and what it can do.

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

Encapsulation

A

The hiding of the implementation of a class and controlling its attributes and methods. Allows developers to hide how the classes are made but keep the relevant info (like methods and attributes) so it can be interacted with as anyone using the class only needs to understand its interface (attributes and methods)

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

Inheritance

A

Allows a child class to inherit attributes and methods from a parent class while keeping its unique ones. Reduces redundant code as enables subclassed to reuse exsiting functionality

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