Sunday, January 17, 2010

Object-Oriented Development

After spending time in understanding syntax of OOPS languages, it becomes imperative to enter the real world and understand how efficiently problems are mapped to behavior of OOPS objects. At many workstations, this is achieved via a language platform UML.



UML stands for unified modelling language, which via pictorial representations tries to resolve the possible states of the process.To appreciate this language more, lets have a quick recap of some important terms:



1. Abstract Class: No implementation method defined for an operation



2. Actor: Role taken by user while invoking a use case



3. Classifier: A category of UML elements that have some common features



4. Containment by Value: An object contains another object



5. Containment by Reference: An object contains a pointer to another object



6. Join: A point in an activity diagram where several concurrent flows synchronize, waiting until all are complete before continuing with a single flow



7. Namespace : A context in which an identifier exists



8. Package: Grouping of classes with related functionality



9. Template: A class that accepts a compile-time parameter defining the type to be used within the class









Links for reference:

http://en.wikipedia.org/wiki/unified_modeling_language



http://www.modelica.org/







Quiz:

1. Discuss the interacting objects while writing SW for a telephone answering machine.

2. Will this technique be helpful for dynamic or digital models?

2 comments:

Sandy said...

I would differ on the point of Abstract Class. An abstract class need not necessarily be a class with no implementation defined. An abstract class usually serves as a point of extension, but can surely have both implementations to various operations, and also have the final implementations.

Also, a package may not necessarily be grouping of classes with related functionality. They may also be grouped on the basis of layers in an n-tier architecture (though most widely used in web applications).

I would like readers to answer one more questions here, if you won't mind! How does namespace and templates aid in coding, what are their advantages and disadvantages?

Pilot-Pooja said...

As told by Bjarne Stroustrup:


Templates are used in the field for various reasons, the main one being to take advantage of generic programming. The importance of templates is evidenced by the introduction of a robust library in the C++ ISO standard. The library of algorithms and containers is called the Standard Template Library, or STL for short. It uses templates to implement an efficient code base that is reusable and extensible.

But templates have a few negative aspects that are not widely explored. First, since C++ does not have binary run-time extensibility, templates can't be linked and distributed as a library. They must be compiled at compile time, and, therefore, all implementations of a template algorithm must be included in the header files in their entirety. You can easily see this by analyzing the STL standard header files.


Mindbox