Friday, 15 June 2012

procedural programming - Practical Explanation : Can anyone Explain the difference between POPS and OOPS with Example? -



procedural programming - Practical Explanation : Can anyone Explain the difference between POPS and OOPS with Example? -

i visited many sites differences between procedular oriented programming , object oriented programming , did not practical reply .

everyone saying theoritical reply .

can give practical explanation ?

procedural programming list or set of instructions telling computer step step , how perform first code sec code.

the best illustration of procedural language c

for e.g here python code procedural programming (any code without oops):

x = int(input('enter number: ')) def even_odd(x): if x%2 == 0: print('even') else: print('odd') even_odd(x)

object oriented programming style of programming uses classes , objects wrap code , info helps utilize lesser code , @ 1 place.

every modern language uses oop

for e.g: class test: # code here along variables , functions x = 'something' #some code def test_func(): # function #your function code here obj = test() #this object created above class used access info within class

theoretically, real world illustration think god uses object oriented programming, maybe first created parent class called living things contains exact same properties exact 2 eyes, 2 hands, 1 mouth etc, , inherited more subclasses human being, tiger, rat same parent class ;)

oop procedural-programming

No comments:

Post a Comment