Week 1\Lec 1&2 Flashcards
how is the problem with the procedure-oriented approach view?
, the problem is viewed as a sequence of tasks to be performed such as reading, calculating and printing
what is the program standing on in procedure-oriented approach?
the primary focus is on functions. As a number of functions are written to implement multiple tasks to solve problems
What do we mean by global data?
They are variables declared in such away they can be
accessed directly or indirectly (by reference) by all other functions.
What is the major limitations of procedural paradigm?
It is difficult to develop a large complex.
Why is Procedure‐Oriented Programming unsecure?
every function has complete access to the exposed variables, there is no protection on your data (a new programmer can corrupt the data accidentally when creating function).
Why is Procedure‐Oriented Programming not reusable?
Because procedural code needs to recreate the code if is needed to use in another application.
Why is procedural code hard to maintain ?
Because if new data is to be added, all the functions using that data need to be modified.
What is the fundamental idea behind object‐oriented languages ?
Is to combine into a single unit both data and the functions that operate on that data. and such unit is called object
What is oop?
It is a computer programming paradigm that organizes/ models software design around data or objects rather than functions and logic. It does not refer to a specific language but rather to a way to build a program or a methodology to apply.
How is the problem viewed in oop?
The problem is divided into the number of entities called objects and then builds data and functions around these objects. Communication of the objects done through function (called method).
Why is oop secure ?
Because the data is hidden and cannot be accessed by external functions. It ties the data more closely to the functions that operate on it, and protects it from accidental modification from the outside functions
Why is oop reusable?
Because the object is a self contained unit. Therefore, it can be easily incorporated into another program.
Why is oop easy to maintain?
Because each object is responsible of its data. When working with OOP languages, you know exactly where to look when something goes wrong
What are objects ?
An object is a software bundle of variables and related methods. It have state behavior.
what does objects contain from ?
Each object contains data, and code to manipulate the data