Modular Structered and OOPS

Compare Modular Structered Programming and Object Oriented Programming

Questions by bijula

Showing Answers 1 - 6 of 6 Answers

In Modular programming everything is broken down into modules performing a constituent task.

Object Oriented programming revolves around a real world object. A Car Object is different from a driver Object yet both of them communicate using messages (or generally termed as methods). The main advantage of Object oriented programming is

encapsulation and Modularity

Users can easily change the car object without even worrying about the driver object even though they are in the same program. And any unwanted Objects (users) cannot access our object. Contrast this to the modular structure theme, if you change some thing in one structure it affects the entire program

  Was this answer useful?  Yes

mucdull

  • Nov 15th, 2008
 

Modular programming promotes the separation of a program into components
called modules. Interfaces act as the logical boundaries between modules which
express elements that are provided and required by the module. All elements
defined within a module are visible to other modules.


OO programming is similar to modular programming in the way that the
classes can be viewed as modules. Each class expresses a public interface that
is similar to the interface expressed in a module. However OO programming
introduces three very important concepts on top of modules: encapsulation,
inheritance, and polymorphism.


Simply put, encapsulation allows one to make only part of a class visible
to other classes , protecting the implementation. Inheritance allows one to
create new classes or subclasses that include elements of existing classes or
base classes. Polymorphism allows one to override existing behavior of the
base classes in a subclass.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions