Вы находитесь на странице: 1из 3

Master of Computer Application (MCA) Semester V MC0083 OOAD Using UML 4 Credits (Book ID: B0969) Assignment Set

et 1 (60 Marks)
1. Write about the Object Oriented Systems Development Methodology with relevant real
time examples .

Object oriented systems development methodologyIn an object-oriented environment, software is a collection of discrete objects that encapsulate theirdata as well as the functionality to model real world objects . In an object oriented system,everything is an object and each object is responsible for itself. In a payroll application, instead of saying, System, compute the payroll of this employee, you tell the employee object, Compute yourpayroll.1.4 Advantages of Object OrientationObject oriented systems are easier to adapt to changing requirements, easier to maintain, morerobust, and promote greater design and code reuse. Higher level of abstraction: Top-down approach supports abstraction at the function level. Theobject-oriented approach supports abstraction at the object level. Since objects encapsulate both data(attributes) and functions (methods), they work at a higher level of abstraction. Seamless transition among different phases of software development: The object-oriented approachessentially uses the same language to talk about analysis, design, programming and database design.This seamless approach reduces the level of complexity and redundancy and makes for clearer, morerobust system development. Encouragement of good programming techniques : In a properly designed system, the classes will begrouped into subsystems but remain independent; therefore, changing one class has no impact onother classes, and so, the impact is minimized which encourages good programming. Promotion of reusability : Objects are reusable because they are modeled directly out of real-worldproblem domain. The object orientation adds inheritance, which is a powerful technique that allowsclasses to be built from each other and therefore, only differences and enhancements between theclasses need to be designed and coded. 2. Describe the following Object Oriented concepts with relevant real-time examples: Objects Encapsulation and Information Hiding PolymorphismAns:2 Objects : Informally an object represents an entity, either physical, conceptual or software.Physical entityConceptual entitySoftware entityA more formal definition: An object is a concept,abstraction or thing with sharp boundaries andmeaning for an application. An objectis something that has: STATE, BEHAVIOUR, IDENTITYAn object is represented as rectangles with underlined names

Object identity: An object retains its identity even if some or all of the values of variables or definitionsof methods change over time. This concept of object identity is necessary in applications but doe notapply to tuples of a relational database. Object identity is a stronger notion of identity than typicallyfound in programming languages or in data models not based on object orientation.Several forms of identity: value: A data value is used for identity (e.g., the primary key of a tuple in arelational database). name: A user-supplied name is used for identity (e.g., file name in a file system).built-in: A notion of identity is built-into the data model or programming languages, and no user-supplied identifier is required (e.g., in OO systems).Object identity is typically implemented via a unique, system-generated OID. The value of the OID isnot visible to the external user, but is used internally by the system to identify each object uniquelyand to create and manage inter-object references.There are many situations where having the system generate identifiers automatically is a benefit,since it frees humans from performing that task. However, this ability should be used with care.System-generated identifiers are usually specific to the system, and have to be translated if data aremoved to a different database system. System-generated identifiers may be redundant if the entitiesbeing modeled already have unique identifiers external to the system, e.g., SIN#. Encapsulation and Information Hiding: The goal of encapsulation is to expose only enough of amodule or subsystem to allow other modules to make use of it. Object-Oriented Programming allowsyou to specify the degree of visibility of elements of your code, so that client code is restricted in whatit can access. Thus, you can syntactically seal off implementation details, leading to more flexibilityand maintainability in your system.EXAMPLE cars and owners...all the functions of cars are encapsulated with the owners..No one else can access it... Polymorphism : In the UML it is assumed that if an operation is applied to an object and there areseveral alternative classes that have the operation defined then the object to which the operation isapplied always determines the operation that is executed. This is even true if the access to the objectis via a pointer in C+ + using syntax like this: pointer->function(arguments).For example if there is a Base class with a function f() and a Derived class that overrides f() then anobject in the Derived class will execute Derived's f, and an object in the Base class executes the Basef. This is true even if the access is via a pointer to the object and if the variable holding the pointer isdeclared to be of the Base type

Вам также может понравиться