Tuesday, February 22, 2011

Questions that will be ask on 1 Feb 2011

Questions :

List the differences of structured programming, procedural programming and object oriented programming.

Answer :

Procedural programming
-Approach specifying the steps the program must take to reach the desired state.
-Using programming languange to create computer memor y locations.
-Also know as routine , subroutines, methods, or functions.
-Defines the variable memory location
-Invokes a eries of procedure to input , manipulate, and output the values stored in those locations.

Structured programming
-Composed of simple , hierarchical program flow structure.
-Three flow structure : sequential , selection, and repitition.
-Sequential refers to a sequence of statements executed in order.
-Selection is executed depending on the state of the program.
-Repitition is execute until the program reaches a certain tate of applied to every element of a collection.
-Associated with a “top-down design” approach.

Object oriented programming
-Is an extension of procedural programming.
-Made up of states and methods (functions).
-State of an object are known as attributes.
-Method(functions)to accomplish tasks.
-The attributes and methods are encapsulated into objects that are then used much like real world objects.
-Programmer are allowed to access to data or procedures only via a specified interface.

 

No comments:

Post a Comment