Sie sind auf Seite 1von 8

Master of Computer Application (MCA) Semester 5 MC0083 Object Oriented Analysis & Design using UML Assignment Set 1

1. Explain the following Object Oriented Concepts with suitable examples for each: A. Objects Ans: - An object can be considered a "thing" that can perform a set of related activities. The set of activities that the object performs defines the object's behavior. For example, the hand can grip something or a Student (object) can give the name or address. In pure OOP terms an object is an instance of a class.

B. Encapsulation and information hiding Ans: - The encapsulation is the inclusion within a program object of all the resources need for the object to function - basically, the methods and the data. In OOP the encapsulation is mainly achieved by creating classes, the classes expose public methods and properties. The class is kind of a container or capsule or a cell, which encapsulate the set of methods, attribute and properties to provide its indented functionalities to other classes. In that sense, encapsulation also allows a class to change its internal implementation without hurting the overall functioning of the system. That idea of encapsulation is to hide how a class does it but to allow requesting what to do.

In order to modularize/ define the functionality of a one class, that class can uses functions/ properties exposed by another class in many different ways. According to

Object Oriented Programming there are several techniques, classes can use to link with each other and they are named association, aggregation, and composition. There are several other ways that an encapsulation can be used, as an example we can take the usage of an interface. The interface can be used to hide the information of an implemented class

C. Polymorphism Ans: - Polymorphisms is a generic term that means 'many shapes'. More precisely Polymorphisms mean the ability to request that the same operations be performed by a wide range of different types of things. At times, I used to think that understanding Object Oriented Programming concepts have made it difficult since they have grouped under four main concepts, while each concept is closely related with one another. Hence one has to be extremely careful to correctly understand each concept separately, while understanding the way each related with other concepts. In OOP the polymorphisms is achieved by using many different techniques named method overloading, operator overloading and method overriding.

2. Explain the following Object Oriented Methodologies: A. Rumbaugh et al.s Object Modeling Technique Ans: - The Object Modeling Technique (OMT) presented by Jim Rumbaugh and his co-workers describes 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 and 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. The object model The object model describes the structure of objects in a system: their identity, relationships to other object attributes, and operations. The object diagram contains classes interconnected by association lines. Each class represents a set of individual objects. The association lines establish relationships among the classes. Each association line represents a set of links from the objects of one class to the objects of another class. The OMT dynamic model OMT provides a detailed and comprehensive dynamic model, in addition to letting you depict states, transitions, events, and actions. The OMT state transition diagram is a network of states and events. Each state receive one or more events, at which time it makes the transition to the next state. The next state depends on the current state as well as the events. The OMT functional model The OMT data flow diagram (DFD) shows the flow of data between different processes in a business. An OMT DFD provides a simple and intuitive method for describing business processes without focusing on the details of computer systems. Data flow diagrams use four primary symbols: 1. The process is any function being performed; for example, verify Password or PIN in the ATM system. 2. The data flow shows the direction of data element movement; for example, PIN code. 3. The data store is a location where data are stored; for example, account is a data store in the ATM example. 4. An external entity is a source or destination of a data element; for example, the ATM card reader. Overall, the Rumbaugh et al. OMT methodology provides one of the strongest tool sets for the analysis and design of object-oriented systems.

B. The Booch Methodology Ans: - The Booch methodology is a widely used object-oriented method that helps you design your 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. The Macro development process The macro process serves as a controlling framework for the micro process and can take weeks or even months. The macro development process consists of the following steps: 1. Conceptualization. During conceptualization, you establish the core requirements of the system. You establish a set of goals and develop a prototype to prove the concept. 2. Analysis and development of the model. In this step, you use the class diagrams to describe the roles and responsibilities objects are to carry out in performing the desired behavior of the system. Then, you use the object diagram to describe the desired behavior of the system in terms of scenarios or alternatively, use the interaction diagram to describe behavior of the system in terms of scenarios. 3. Design or create the system architecture. In the design phase, you use the class diagram to decide what classes exist and how they relate to each other. Next, you use the object diagram to decide what mechanisms are used to regulate how objects collaborate. Then, you use the module diagram to map out where each class and object should be declared. Finally, you use the process diagram to determine to which processor to allocate a process. Also, determine the schedules for multiple processes on each relevant processor. 4. Evolution or implementation. Successively refine the system through much iteration. Produce a stream of software implementations (or executable releases), each of which is a refinement of the prior one. 5. Maintenance. Make localized changes to the system to add new requirements and eliminate bugs. The Micro development process Each macro development process has its own micro development processes. The micro development process consists of the following steps: 1. 2. 3. 4. Identify Identify Identify Identify classes and objects. class and object semantics. class and object relationships. class and object interfaces and implementation

3. Explain the following with respect to UML Architecture: A. Language Architecture and Language Formalism Ans: -

B. Four - Layer Meta model Architecture Ans: - 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. They are as follows: 1. It refines semantic constructs by recursively applying them to successive meta layers. 2. It provides an architectural basis for defining future UML meta model extensions. 3. It furnishes an architectural basis for aligning the UML meta model with other standards based on a four-layer meta modeling architecture, in particular the OMG Meta-Object Facility (MOF). The generally accepted framework for meta modeling is based on an architecture with four layers namely:

1. 2. 3. 4.

meta-meta model meta model model user objects

The meta-meta modeling layer forms the foundation for the meta modeling architecture. The primary responsibility of this layer is to define the language for specifying a meta model. A meta-meta model defines a model at a higher level of abstraction than a meta model, and is typically more compact than the meta model that it describes. A meta-meta model can define multiple meta models, and there can be multiple meta-metamodels associated with each meta model. While it is generally desirable that related metamodels and meta-metamodels share common design philosophies and constructs, this is not a strict rule. Each layer needs to maintain its own design integrity. Examples of meta-metaobjects in the meta-metamodeling layer are: MetaClass, MetaAttribute, and MetaOperation. A metamodel is an instance of a meta-metamodel. The primary responsibility of the metamodel layer is to define a language for specifying models. Metamodels are typically more elaborate than the meta-metamodels that describe them, especially when they define dynamic semantics. Examples of metaobjects in the metamodeling

layer are: Class, Attribute, Operation, and Component. A model is an instance of a metamodel. 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, askPrice, sellLimitOrder, and StockQuoteServer. User objects (a.k.a. user data) are an instance of a model. The primary responsibility of the user objects layer is to describe a specific information domain. Examples of objects in the user objects layer are:, 654.56, sell_limit_order, and

C. Package Structure Ans: - The complexity of the UML metamodel is managed by organizing it into logical packages. These packages group metaclasses that show strong cohesion with each other and loose coupling with metaclasses in other packages. The Foundation and Behavioral Elements packages are further decomposed as : Foundation Packages Behavioral Elements Packages

D. Levels of Formalism Ans: - A common technique for specification of languages is to first define the syntax of the language and then to describe its static and dynamic semantics. The syntax defines what constructs exist in the language and how the constructs are built up in terms of other constructs. Sometimes, especially if the language has a graphic syntax, it is important to define the syntax in a notation independent way, that is, to define the abstract syntax of the language. The concrete syntax is then defined by mapping the notation onto the abstract syntax. The static semantics of a language define how an instance of a construct should be connected to other instances to be meaningful, and the dynamic semantics define the meaning of a well-formed construct. The meaning of a description written in the language is defined only if the description is well formed, that is, if it fulfills the rules defined in the static semantics. The specification uses a combination of languages a subset of UML, an object constraint language, and precise natural language to describe the abstract syntax and semantics of the full UML. In constructing the UML metamodel different techniques have been used to specify language constructs, using some of the capabilities of UML. The main language constructs are reified into metaclasses in the metamodel. Other constructs, in essence being variants of other ones, are defined as stereotypes of metaclasses in the metamodel. This mechanism allows the semantics of the variant construct to be significantly different from the base metaclass. Another more lightweight way of defining variants is to use metaattributes. As an example, the aggregation construct is specified by an attribute of the metaclass AssociationEnd, which is used to indicate

if an association is an ordinary aggregate, a composite aggregate, or a common association.

E. Naming Conventions and Typography Ans: - In the description of UML, the following conventions have been used: 1. When referring to constructs in UML, not their representation in the metamodel, normal text is used. 2. Metaclass names that consist of appended nouns/adjectives, initial embedded capitals are used (for example, ModelElement, StructuralFeature). 3. Names of metaassociations/association classes are written in the same manner as metaclasses (for example, ElementReference). 4. Initial embedded capital is used for names that consist of appended nouns/adjectives (for example, ownedElement, allContents). 5. Boolean metaattribute names always start with is (for example, isAbstract). 6. Enumeration types always end with Kind (for example, AggregationKind). 7. While referring to metaclasses, metaassociations, metaattributes, etc. in the text, the exact names as they appear in the model are always used. 8. Names of stereotypes are delimited by guillemets and begin with lowercase (for example, type).

4. Describe the following UML notations: A. Diagram Elements (Graphs, Drawing paths, ) Ans: -

B. Model Management Ans: -

C. General Extension Mechanisms Ans: -

Das könnte Ihnen auch gefallen