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

MC0083 Object Oriented Analysis & Design using UML

Que.1. Explain the following Object Oriented Concepts with suitable examples for each: a. Objects b. Encapsulation and information hiding c. Polymorphism Ans A Objects The object means a combination of data and logic that represents some real world entity. When developing an object-oriented application, two basic questions always rise : What objects does the application need? What functionality should those objects have? Programming in an object-oriented system which consists of adding new kinds of objects to the system and defining how they behave. Objects are grouped in classes A class is a set of objects that share a common structure and a common behavior, a single object is simply an instance of a class. A class is a specification of structure (instance variables), behavior (methods), and inheritance of objects. Example:- Objects are grouped in classes A class is a set of objects that share a common structure and a common behavior, a single object is simply an instance of a class Ans.B Encapsulation and information hiding C++ has a very general encapsulation protection mechanism with public, private, and protected members Public members (member data and member functions) may be accessed from anywhere Private members are accessible one from within a class An object data representation, such as a list or an array, usually will be private Protected members can be accessed only from subclasses An important factor in achieving encapsulation is the design of different classes of objects that operate using common protocol, or objects user interface This means that many objects will respond to the same message but each will perform the message using operations tailored to its class Data abstraction is the benefit of the object-oriented concept that incorporates encapsulation and polymorphism Ans. C Polymorphism Polymorphism means that the same operation may behave differently on different classes Polymorphism allows us to write generic, reusable code more easily, because we can specify general instructions and delegate the implementation details to the objects involved Since no assumption is made about the class of an object that receives a message, fewer dependencies Are needed in the code and, therefore maintenance is easier Example - In a payroll system, manager, office worker, and Production worker objects all will respond to the compute payroll message, but the actual operations performed are object specific

Que.2. Explain the following Object Oriented Methodologies: a. Rumbaugh et al.s Object Modeling Technique b. The Booch Methodology Ans A Rumbaugh et al.s Object Modeling Technique This was presented by Jim Rumbaugh and his co-workers describe a method for the analysis, design, and implementation of a system using an object-oriented technique. OMT is a fast, intuitive approach for identifying and modeling all the objects making up a system. Details such as class attributes, method, inheritance, and association also can be expressed easily. The dynamic behavior of objects within a system can be described using the OMT dynamic model. This model lets you specify detailed state transitions and their descriptions within a system. Finally, a process description and consumer-producer relationships Can be expressed using OMTs functional model. OMT consists of four phases, which can be Performed iteratively 1 Analysis:-The results are objects, dynamic and functional models. 2 System design: -The results are a structure of the basic architecture of the system along with high-level strategy decisions. 3 Object design: -This phase produces a design document, consisting of detailed objects static, dynamic, and functional models. 4 Implementation: -This activity produces reusable, extendible, and robust code OMT separates modeling into three different parts: 1. An object model, presented by the object model and the data dictionary. 2. A dynamic model, presented by the state diagrams and event flow diagrams. 3. A functional model, presented by data flow and constraints Ans .B The Booch Methodology The Booch methodology is a widely used object-oriented method that helps us to design our system using the object paradigm. The Booch method consists of the following diagrams: Class diagrams, Object diagrams, State transition diagrams, Module diagrams, Process diagrams, Interaction diagrams, The Booch methodology prescribes a macro development process and a micro development process.

Object modeling using Booch notation. The arrows represent specialization; for example, class Taurus is subclass of the class Ford.

Que.3. Describe the following UML notations: a. Diagram Elements (Graphs, Drawing paths ) b. Model Management c. General Extension Mechanisms Ans. A Diagram Elements (Graphs, Drawing paths ) Most UML diagrams and some complex symbols are graphs containing nodes connected by paths. The information is mostly in the topology, not in the size or placement of the symbols. There are three kinds of visual relationships that are important: 1. connection 2. Containment and 3. Visual attachment. These visual relationships map into connections of nodes in a graph, the parsed form of the notation. UML notation is intended to be drawn on 2-dimensional surfaces. Some shapes are 2 dimensional projections of 3-d shapes (such as cubes), but they are still rendered as icons on a2-dimensional surface. In the near future, true 3-dimensional layout and navigation may be possible on desktop machines. Ans.B Model Management The UML meta model is defined as one of the layers of a four-layer meta modeling architecture. This architecture is a proven infrastructure for defining the precise semantics required by complex models. There are several other advantages associated with this approach. A model is an instance of a met model. The primary responsibility of the model layer is to define a language that describes an information domain. Examples of objects in the modeling layer are,StockShare, ask Price, sellLimitOrder, and StockQuoteServer. Ans C General Extension Mechanisms The UML is a general purpose; tool supported, and standardized modeling language that is used in order to specify, visualize, construct and document all the elements of a wide range of system intensive processes. It promotes a use case driven, architecture centric, iterative and incremental process, which is object oriented and component based. The UML is broadly applicable to different types of systems, domains, methods and processes, which is why it is such a popular and broadly used language. There exist four common mechanisms that can be used consistently throughout the language - namely specifications, common divisions, adornments, and extensibility mechanisms

Que.4. What are the various classes in class stereotypes of software development process? Explain in detail. Ans Development Processes, defined in terms of the UMLs extension mechanisms, namely Stereotypes, Tagged Values, and Constraints This chapter describes a UML extension that has been found useful in software development processes Although this extension was based on the Objector process, it is general-purpose and may also be applied to other software development processes It is not meant to be a comprehensive description of all software development processes, but is an example of one such process Class Stereotypes Analysis classes come in the following three kinds: 1) entity, 2) control, and 3) boundary Design classes are not stereotyped in the process Entity is a class that is passive; that is, it does not initiate interactions on its own An entity object may participate in many different use case realizations and usually outlives any single interaction Control is a class, an object of which denotes an entity that controls interactions between a collection of objects A control class usually has behavior specific for one use case and a control object usually does not outlive the use case realizations in which it participates Boundary A Boundary is a class that lies on the periphery of a system, but within it It interacts with actors outside the system as well as objects of all three kinds of analysis classes within the system Notation Class stereotypes can be shown with keywords in guillemots They can also be shown with the following special icons

Control Pan Tracker Pan Tracker

Boundary Order Entry Order Entry

Entity Bank Account Bank Account

Class Stereotypes

Que.5. Describe the goals and scope of UML with suitable examples. Ans Goals of the UML Provide users with a ready-to-use, expressive visual modeling language to develop and exchange meaningful models. Furnish extensibility and specialization mechanisms to extend the core concepts. Support specifications that are independent of particular programming languages and development processes. Provide a formal basis for understanding the modeling language Encourage the growth of the object tools market Support higher-level development concepts such as components, collaborations, frameworks and patterns Integrate best practices. Scope of the UML The Unified Modeling Language (UML) is a language for specifying, constructing, visualizing, and documenting the artifacts of a software-intensive system First and foremost, the Unified Modeling Language fuses the concepts of Booch, OMT,and OOSE The result is a single, common, and widely usable modeling language for users of these and other methods Secondly, the Unified Modeling Language pushes the envelope of what can be donewith existing methods As an example, the UML authors targeted the modeling of concurrent, distributed systems to assure the UML adequately addresses these domains Thirdly, the Unified Modeling Language focuses on a standard modeling language, not standard process Although the UML must be applied in the context of a process, it is our experience that different organizations and problem domains require different processes (For example, the development process for shrink-wrapped software is an interesting one, but building shrink-wrapped software is vastly different from building hard-real-time avionics systems upon which lives depend) Therefore, the efforts concentrated first on a common met model (which unifies semantics) and second on a common notation (which provides human rendering of these semantics) The UML authors promote a development process that issue-case driven, architecture centric, and iterative and incremental The UML specifies a modeling language that incorporates the object-oriented communitys consensus on core modeling concepts It allows deviations to be expressed inters of its extension mechanisms The Unified Modeling Language provides the following: Semantics and notation to address a wide variety of contemporary modeling issues in a direct and economical fashion Semantics to address certain expected future modeling issues, specifically related tocomponent technology, distributed computing, frameworks, and excitability Extensibility mechanisms so individual projects can extend the metamodel for their application at low cost We dont want users to directly change the UML met model Extensibility mechanisms so that future modeling approaches could be grown on top of the UML Semantics to facilitate model interchange among a variety of tools

Que.6. what are the two ways of communicating with subsystem? Explain Ans A subsystem is a grouping of model elements that represents a behavioral unit in physical system A subsystem offers interfaces and has operations In addition, the Model Elements of a subsystem are partitioned into specification and realization elements In the met model, Subsystem is a subclass of both Package and Classifier It may have a set of Features (constrained to be Operations and Receptions) and Associations The contents of a Subsystem are divided into two subsets: specification elements and realization elements The former subset provides, together with the Operations of the Subsystem, a specification of the behavior contained in the Subsystem, while the Model Elements in the latter subset jointly provide a realization of the specification any kind of Model Element can be specification element or a realization element The purpose of the subsystem Construct is to provide a grouping mechanism for specifying a behavioral unit of a physical system A subsystem serves as a specification unit for the behavior of its contained Model Elements The contents of a subsystem are defined in the same way as for a package, thus it consists of owned elements and imported elements, with unique names or aliases within the subsystem The contents of a subsystem are divided into two subsets: 1) Specification element and 2) Realization elements The specification elements: - together with the operations and receptions of the subsystem, are used for giving an abstract specification of the behavior offered by the realization elements Subsystems contained in the realization part represent subordinate subsystems; that is, subsystems at the level below in the containment hierarchy, hence owned by the current subsystem The specification of a subsystem consists of the specification elements together with the subsystems features (operations and receptions) Use cases are used to specify complete sequences performed by the subsystem Operations are suitable to represent simpler subsystem services that are used independent of each other There are two ways of communicating with a subsystem, either by sending stimuli to the subsystem itself to be re-directed to the proper recipient inside the subsystem, or by sending stimuli directly to the recipient inside the subsystem

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