0% found this document useful (0 votes)
2 views

Cse v Sem Ooad Unit 2

The document discusses Object-Oriented Analysis and Design, focusing on concepts such as domain models, conceptual classes, and the elaboration phase of software development. It outlines the steps for creating domain models, the importance of associations and attributes, and the structure of system sequence diagrams. Additionally, it explains the logical architecture of software systems and the significance of layers in organizing software classes.

Uploaded by

Imreena Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Cse v Sem Ooad Unit 2

The document discusses Object-Oriented Analysis and Design, focusing on concepts such as domain models, conceptual classes, and the elaboration phase of software development. It outlines the steps for creating domain models, the importance of associations and attributes, and the structure of system sequence diagrams. Additionally, it explains the logical architecture of software systems and the significance of layers in organizing software classes.

Uploaded by

Imreena Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Object Oriented Analysis and Design

UNIT II

1) Define a Domain Model.


Object-oriented analysis is concerned with creating a description of the domain from the
perspective of objects. There is an identification of the concepts, attributes, and associations
that are considered noteworthy.
The result can be expressed in a domain model that shows the noteworthy
domain concepts or objects. For example, a partial domain model is shown in Figure1.
It can be noted that a domain model is not a description of software objects; it is a
visualization of the concepts or mental models of a real-world domain and it is also called
a conceptual object model.

Figure 1 Partial domain model of the dice game

2) Define a) Conceptual Class, b) Software Class, c) Implementation Class.


Conceptual class - real-world concept or thing. A conceptual or essential perspective. The
UP Domain Model contains conceptual classes.
Software class - a class representing a specification or implementation perspective of
a software component, regardless of the process or method.
Implementation class - a class implemented in a specific OO language such as Java.
3) What is Elaboration?
Elaboration often consists of two or more iterations (2 to 6 weeks duration)
Each iteration is time-boxed (i.e. End Date fixed)
Elaboration is not Design Phase (i.e. the model is not fully developed)
Also it is not a throw away Prototype; rather the code and design are production quality
In other words, Elaboration is the initial series of iterations during which
The core, risky software architecture is programmed and tested
The majority of requirements are discovered and stabilized
The major risks are mitigated or reduced
4) Define the first iteration is elaboration phase.
Iteration-1 of Elaboration Phase emphasizes fundamental and common OOA/D
skills used in building OO Systems.
Example – NextGen POS
Iteration 1 Requirements
The requirements for the first iteration of the NextGen POS application follow:
• Implement a basic, key scenario of the Process Sale use case: entering items
andreceiving a cash payment.
• Implement a Start Up use case as necessary to support the initialization
needs of the iteration.
• Nothing fancy or complex is handled, just a simple happy path scenario, and
thedesign and implementation to support it.
• There is no collaboration with external services, such as a tax
calculator or product database.
• No complex pricing rules are applied.
• The design and implementation of the supporting UI ,database,are done(Not in detail)
• Subsequent iterations will grow on this foundation.

5) What happens in inception during elaboration?


Inception is a short step to elaboration. It determines basic feasibility, risk and scope,
to decide if the project is worth more serious investigation

6) What are the likely activities and artifacts in inception?

A short requirement workshop


Most actors, goals and Use Cases named.
Most use cases written in brief format; 1—20% of use cases written in
fully dressed format
Most influential and risky quality requirements identified
Supplementary specification written(Version One)
Risk List
Technical proof-of-Concept, User Interface-Oriented Prototypes
Decision on components : to buy/build/reuse taken(Eg. To buy Tax calculation
package
High Level candidate Architecture made(not a detailed, final or correct one made)
Used as starting point of investigation(Eg. A Java Client side
application with no Application Server, and no Oracle for Database
7) What artifacts may start in Inception?
Sno Artifact Features
01 Domain Model Visualization of Domain concepts

02 Design Model Set of Diagrams describing the Logical
Design (Software Class Diagrams,
Object interaction Diagrams, and
Package Diagrams)
03 Software Architecture A Learning Aid
Document Key Architectural Issues & their
Resolution in summary form
Summary of outstanding Design Ideas
& its motivation

04 Data Model Database Schemas

Mapping between Objects & Non-
Object representations

05 Use Case Story Describe UI, Navigation Paths, Usability
Boards, UI Models
Prototypes

8) What is a Domain Model?


A domain Model is the most important and classic model in OO Analysis.

It illustrates noteworthy Concepts in a Domain.
Source of Inspiration for designing some software objects(which become
inputs to several artifacts)

9) Give an example of domain model with UML class Diagram notation.

Fig 2.1 Partial Domain Model – A Visual Dictionary


Explanation
A partial Domain Model drawn with UML class diagram notation -:
Conceptual classes of Payment and Sale are significant in this domain.
A payment is related to Sale which is meaningful to note.
The Sale has date and time (Attributes we care about)

10) Why call a domain model a visual dictionary?


A domain model is a visual dictionary of
the noteworthy abstractions
domain vocabulary
information content
A domain model visualizes and relates words or concepts in the domain. It also shows
an abstraction of the conceptual classes and shows how they relate to each other.

11) What are conceptual classes?


Conceptual Classes
Informally, a conceptual class is an idea, thing, or object.
More formally, a conceptual class may be considered in terms of its symbol, intension,
and extension

• Symbol—words or images representing a conceptual class.


• Intension—the definition of a conceptual class.
• Extension—the set of examples to which the conceptual class applies.

For example, consider the conceptual class for the event of a purchase
transaction. We may choose to name it by the symbol Sale. The intension of a
Sale may state that it "represents the event of a purchase transaction, and has a
date and time." The extension of Sale is all the examples of sales; in other words,
the set of all sales.

12) Are domain and Data Models are the same thing?
A domain model is not a data model (which by definition shows persistent data to be
stored somewhere)
13) How a domain model is created?
Steps involved in creating a domain model :
Find the conceptual classes
Draw them as classes in a UML class diagram
Add associations and attributes

14) What are the three strategies to find conceptual classes?


a) Reuse or modify existing models (First, Best and easiest approach). Thereare
published ,well crafted domain models and data models for many common
domains ,such as inventory, finance, health, banking and so forth.
b) Use a Category List
c) Identify noun phrases.

15) What is Conceptual Class Category List?


We can kick start the creation of a domain model by making a list of candidate
conceptual classes. The following table contains many common categories(which are usually
worth considering as meeting business information needs)
16) Explain the method of finding conceptual classes using Noun Phrase Identification.
Noun phrase identification is another useful technique which is based on linguistic
analysis.
It is based on identifying the nouns and noun phrases in textual
descriptions of adomain, which can be considered as candidate conceptual
classes or attributes.
The fully dressed use cases are an excellent description to draw from for this
analysis. For example, the current scenario of the Process Sale use case can be
used.
For example, Noun phrases are identified (shown in bold) from Process
SaleUse case as per the text description below :
Main Success Scenario (or Basic Flow):
1. Customer arrives at a POS checkout with goods and/or services to purchase.
2. Cashier starts a new sale.
3. Cashier enters item identifier.
4. System records sale line item and presents item description, price,
and running total. Price calculated from a set of price rules.
Cashier repeats steps 2-3 until indicates done.
5. System presents total with taxes calculated.
6. Cashier tells Customer the total, and asks for payment.
7. Customer pays and System handles payment.
8. System logs the completed sale and sends sale and payment information to
the external Accounting (for accounting and commissions) and Inventory
systems (to update inventory).
9. System presents receipt.
10. Customer leaves with receipt and goods (if any).
Extensions (or Alternative Flows):
7a. Paying by cash:
1. Cashier enters the cash amount tendered.
2. System presents the balance due, and releases the cash drawer.
3. Cashier deposits cash tendered and returns balance in cash to Customer.
4. System records the cash payment.

6
17) Explain with an example, the method of finding and drawing conceptual classes.

From the category list and known phrase analysis, a list is generated of candidate
conceptual classes for the domain. The list is constrained to the requirements and a
simplified version as for iteration-1. As an example the following are identified list of
conceptal classes for Process Sale scenario :

Sale Cashier
CashPayment Customer
SalesLineItem Store
Item ProductDescription
Register ProductCatalog
Ledger

Item Store Sale


Register

Sales Cashier Customer Ledger


LineItem

Cash Product catalog Product


Payment Description

Fig. Initial POS Domain Model

18) What are Description classes? Give examples.


A Description class contains information that describes something else. For example a Product
Description that records the price, picture and text descriptions of an item. This was first
named the Item-Descriptor pattern.
The need for description classes
An item instance represents a physical item in a store; it may have a serial number
An item has description, price and itemID
A Product Description class records information about items
Even if all inventoried items are sold and corresponding item software
instances are deleted, the Product Description still remains.

19) What is Association? Explain with an example.


An association is a relationship between classes(more precisely instances of these classes)
that indicates some meaningful and interesting connections.

20) Explain Association using UML notation.


UML Definition:
Associations are defined as semantic relationship between two or more classifiers that
involve connections among their instances

7
Records-current

Register Sale

21) What is multiplicity?


Multiplicity defines how many instances of class A can be associated with one
instance of a class B.

Stocks
Store
Item

1 +
Fig. Multiplicity of an Association

22) Give the method of finding Associations using Common Association List.

Category Examples
A is a transaction related to another CashPayment – Sale
transaction B Cancellation - Reservation
A is a line item of a transaction B SalesLineItem - Sale
A is a product or service for a transaction Item – SalesLineItem
B(or line item) (or Sale)
Flight - Reservation
A is a role related to a transaction B Customer – Payment
Passenger - Ticket
A is a physical or logical part of B Drawer – Register
Square - Board
Seat - AirPlane
A is physically or logically contained in /or Register – Store
B Item-Shelf
Square-Board
Passenger - Airline
A is a description for B ProductDescription – Item
FlightDescription - Flight
A is known Sale – Register
/logged/recorded/reported/captured in B Piece – Square
Reservation - Flightmanifest
A is a member of B Cashier – Store
Player – monnopolyGame
Pilot - Airline

A is an organizational Subunit of B Department – Store

8
Maintenance - Airline
A uses or manages or owns B Cashier – Register
Player – Piece
Pilot - Airplane
A is nest to B SalesLineItem – SalesLineItem
Square – Square
City - City

23) Define an attribute. Explain with an example using UML


notation. An attribute is a logical data value of an object.
Example
Sale needs a dateTime attribute
Store needs a name and address
Cahier needs an ID

Sale

dateTime
/ total : Money

Fig. Class and attributes

24) How attributes are used in Domain Models? Explain using examples.

9
25) How domain model is further refined after the first iteration?
Generalization and specializations are fundamental concepts in domain modeling.
Conceptual class hierarchies are often inspiration for Software class hierarchies that exploits
inheritance and reduce duplication of code.
Packages are a way to organize large domain models into smaller units.
Domain model is further refined with Generalization, Specialization,
Association classes, Time intervals, Composition and packages, usage of subclasses

26) What are Association Role Names?


Each end of an association is a role, which has various properties, such as :
1. Name
2. Multiplicity
A role name identifies an end of an association and ideally describes the role played by
objects in the association

10
27) What are System Sequence Diagrams?
A system sequence diagram is, as the name suggests, a type of sequence diagram in UML System
sequence diagrams, also known as SSD, are actually a sub-type of sequence diagrams, whose style
and notation is dictated by the Unified Modeling Language. This language provides a toolkit for
diagram creators to make and read diagrams that are comprehensible regardless of location or
industry. Standard sequence diagrams show the progression of events over a certain amount of time,
while system sequence diagrams go a step further and present sequences for specific use cases. Use
case diagrams are simply another diagram type which represents a user's interaction with the
system.
A system sequence diagram (SSD) illustrates input and output events. An SSD shows – for one particular
scenario of a use case –
• the events that external actors generate,
• their order, and
• inter-system events

The system is treated as a black-box. SSDs are derived from use cases; SSDs are often drawn for the main
success scenarios of each use case and frequent or complex alternative scenarios. SSDs are used as input for
object design

System Events and System Operations: System operations are the operations that the system as a black box
component offers in its public interface. These are high-level operations triggered by an external input event /
system event generated by an external actor. During system behavior analysis, system operations are
assigned to a conceptual class System

Most elements we cover in use case diagrams remain in use throughout a system sequence diagram,
including:

Objects - this box shape with an underlined title represents a class, or object, in UML. Within
a SSD, this shape models the system as a black box (a system with inner workings that are not
immediately visible).

Actors - shown by stick figures, actors are entities that interact with the system, and yet are
external to it.

11
Events - the system events that the actors generate in the sequence. A dashed line, known as a
lifeline, represents events in an SSD. Lifelines may begin with a labeled rectangle shape or an
actor symbol.

28. What is the logical architecture? and layers?


The logical architecture is the large - scale organization of the software classes into packages (or
namespaces), subsystems, and layers. It's called the logical architecture because there's no decision
about how these elements are deployed across different operating system processes or across physical
computers in a network (these latter decisions are part of the deployment architecture).
A layer is a very coarse - grained grouping of classes, packages, or subsystems that has cohesive
responsibility for a major aspect of the system. Also, layers are organized such that "higher" layers
(such as the UI layer) call upon services of "lower" layers, but not normally vice versa. Typically
layers in an OO system include:
•User Interface.
•Application Logic and Domain Objects— software objects representing domain concepts
(for example, a software class Sale) that fulfill application requirements, such as
calculating a sale total.
• Technical Services— general purpose objects and subsystems that provide supporting
technical services, such as interfacing with a database or error logging. These services are
usually application - independent and reusable across several systems.
• In a strict layered architecture, a layer only calls upon the services of the layer directly
below it. This design is common in network protocol stacks, but not in information
systems, which usually have a relaxed layered architecture, in which a higher layer calls
upon several lower layers. For example, the UI layer may call upon its directly subordinate

12
application logic layer, and also upon elements of a lower technical service layer, for
logging and so forth.
• A logical architecture doesn't have to be organized in layers. But it's very common, and
hence, introduced at this time.

29. What Layers are the Focus in the Case Studies?


To reiterate a point made when the case studies were introduced:
Exploring design of the other layers (such as the UI layer) will focus on the design of their interface
to the application logic layer.

30. What is Software Architecture?


An architecture is the set of significant decisions about the organization of a software system, the
selection of the structural elements and their interfaces by which the system is composed, together
with their behavior as specified in the collaborations among those elements, the composition of
these structural and behavioral elements into progressively larger subsystems, and the architectural
style that guides this organization - these elements and their interfaces, their collaborations, and their
composition.
The common theme in all software architecture definitions is that it has to do with the large scale -
the Big Ideas in the motivations, constraints, organization, patterns, responsibilities. and connections
of a system (or a system of systems).

31. How are UML Package Diagrams applied?


UML package diagrams are often used to illustrate the logical architecture of a system - the layers,
subsystems, packages (in the Java sense), etc. A layer can be modeled as a UML package; for
example, the UI layer modeled as a package named UI.
A UML package diagram provides a way to group elements. A UML package can group anything:
classes, other packages, use cases, and so on. Nesting packages is very common. A UML package is a
more general concept than simply a Java package or .NET namespace.
It is common to want to show dependency (a coupling) between packages so that developers can see
the large - scale coupling in the system. The UML dependency line is used for this, a dashed arrowed
line with the arrow pointing towards the depended - on package.
A UML package represents a namespace so that, for example, a Date class may be defined in two
packages. If you need to provide fully - qualified names, the UML notation is, for
example, java::util::Date in the case that there was an outer package named "Java" with a nested
package named "util" with a Date class.
The UML provides alternate notations to illustrate outer and inner nested packages. Sometimes it is
awkward to draw an outer package box around inner packages. Figure is shown below

13
32. How to choose UML CASE tools?
• Choose a UML CASE tool that integrates with popular text - strong IDEs, such as Eclipse or
Visual Studio.
• Choose a UML tool that can reverse - engineer (generate diagrams from code) not only class
diagrams (common), but also interaction diagrams (more rare, but very useful to learn call
- flow structure of a program).
Many developers find it useful to code awhile in their favorite IDE, then press a button, reverse -
engineer the code, and see a UML big - picture graphical view of their design.

33. How Much Time Spent Drawing UML Before Coding?


For a three - week timeboxed iteration, spend a few hours or at most one day (with partners) near the
start of the iteration "at the walls" (or with a UML CASE tool) drawing UML for the hard, creative
parts of the detailed object design. Then stop - and if sketching - perhaps take digital photos, print the
pictures, and transition to coding for the remainder of the iteration, using the UML drawings for
inspiration as a starting point, but recognizing that the final design in code will diverge and improve.
Shorter drawing / sketching sessions may occur throughout the iteration. If agile modeling, then
before each subsequent modeling session, reverse - engineer the growing code base into UML
diagrams, print them out (perhaps on large plotter paper), and refer to them during the sketching
session.

14

You might also like