Unit 1 Frankie Flashcards

1
Q

What is procedural programming

A

Procedural programming is a code that makes use of statements, blocks, procedures and functions

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

What is a statement?

A

Statement is a single instruction, that performs a specific small task.

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

What are blocks?

A

A block of code is a group of statements that are intended to execute in order

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

What is procedures?

A

A procedure processes data, but does not return a value to the code from where it was called.

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

Functions

A

A function is a block of code that does return a value when it has been completed when is called.

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

What are the structures in procedural programming?

A

Sequence
Conditional / selection
Iterative / iteration

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

What is a sequence?

A

When there isn’t any other instruction, statements are executed in sequence, in the order in which they are written.

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

What is a conditional/selection?

A

Condition is more flexible than sequence, it allows a condition to be evaluated to determine whether or not blocks of code should be executed and it could be done by IF statements.

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

What is Iterative/Iteration?

A

These are loops, commands such as while or for and it controls the flow of execution.

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

What is object oriented programming?

A

Object Oriented programming is about creating objects that contain both data and functions

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

What are the features of OOP?

A
Inheritance
Encapsulation
Polymorphism and overloading
Data hiding
Reusability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is inheritance

A

New classes can be defined that inherit from an existing class, the new classes automatically start with the parent class’s attributes and methods, the new child can then add extra attributes or methods as required.

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

What is encapsulation?

A

Encapsulation refers to the process of bundling both the data and the methods that apply to an object into one unit. ( making one class with loads of different variables and functions.)

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

What is polymorphism and overloading?

A

Polymorphism allows you to create multiple versions of the same method. Overloading is the process of being able to define the same method or function multiple times, with each having different parameters.

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

Data hiding

A

Data hiding is used to guarantee that data is always validated ( if appropriate) and is basically making classes and any other data private so no one can access it if is not public

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

Reusability

A

Reusability is the practice of using existing code/anything in programming for a new function or software, this helps development goal of achieving high speed, low cost and quality.

17
Q

What is event driven programming?

A

Is the idea that blocks of code are defined and executed only in response to a specific event being raised such as the code is waiting for a mouse click so it can run the code is supposed to when the mouse click happens.

18
Q

Event driven programming

A

Event driven programming, registers the events needed and you say what block of code should run when that event occurs, and with event driven programming you don’t have to do any state validation because is already doing it for you.

19
Q

What is an event handler?

A

Event handler is the block of code that is intended to run in response to an event. e.g you want a message to appear when a button is clicked, the button being clicked is the event and the event handler is the code that makes the message appear.

20
Q

What is an Event Loop?

A

Event loop is a queue data structure and is used to monitor the events the program must respond to, constantly runs waiting for the predefined event to be triggered, also it uses some CPU processing time even when the program is not actively being used.

21
Q

What is service oriented processing?

A

Service oriented processing refers to background software programs running on a system that are awoken by events, it allows programs to be linked to particular services that may run in the background, however linking a program to a service that runs on the background will use up system processing time and memory because is constantly checking if something happens.

22
Q

What is time driven?

A

Time-driven means that the system is sensitive to time, it allows functions in a program to be scheduled, to activate at particular times or at particular intervals also allows the programmer to add functions that do not need to be monitored by the user.

23
Q

What is trigger function?

A

Trigger functions are designed to assign a particular event with an action/code

24
Q

What is translation in programming?

A

Translation in programming is translating code between programming languages.

25
Q

What are the reasons for translation?

A

Because languages do not last forever, for example if you have code written in a language that is no longer supported what happens as hardware evolves and also does technology, your old language will not be able to support new features, also another reason is to consolidate the languages used, if you have a business and you buy your rival’s business everything must be in the same language and Personnel.

26
Q

What are the benefits of translation?

A

If all software within an organisation is written using the same language, it helps with efficiency. Translating from a less pop to a more pop language will increase the availability of support. It can support new hardware

27
Q

What are the drawbacks of translation?

A

Time investment
Testing
Knowledge requirements - someone good on both languages that can translate it
Not every language has the same features.

28
Q

Why programmers use functions?

A

Because it can be reused once you’ve defined a function you can use it over and over again.
Also because it helps reduce the complexity of the code if you had to write a function every single time.

29
Q

What is the structure and features of event driven programming

A
Structure:
Sub-routines
Call function
Main Loop
Features:
Event
Event Loop
Event Handler
Time Driven
System oriented processing
Trigger Functions
30
Q

What is the structure and features of object oriented programming?

A
Structure:
Class
Objects
Features:
Inheritance 
Encapsulation
Polymorphism and Overloading
Data Hiding
Reusability
31
Q

What is the structure and features of procedural programming?

A
Structure:
Sequence
Selection
Iteration
Features:
Statements 
Blocks
Procedures
Functions