Ooad notes, Study notes of Object Oriented Analysis and Design

Object oriented analysis and design notes

Typology: Study notes

2014/2015
On special offer
30 Points
Discount

Limited-time offer


Uploaded on 06/18/2015

.7859
.7859 🇮🇳

4.4

(17)

1 document

1 / 92

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
UNIT-I
Introduction:
The various trends in S/W development give the change in the languages. In earlier days
S/W developers used Machine Languages, which deals with 0’s and 1’s [Binary
Number]. S/W developers felt it was difficult to program using binary numbers. In later
stage Assembly Language was used for a programming. Assembly Language uses
mnemonics, which is better than binary language. Then high-level language was
introduced. The human understandable English is used in the programming languages.
Initial stages of high-level languages have the procedural /structural languages.
Programmers concentrate more on functions rather than data. To overcome this object
oriented programming languages was introduced. In OOProgramming the programmer
concentrate or gives equal importance to functions and data. The advantages over
procedure languages are OOPS concepts.
Machine Language0,1
Assembly LanguageMnemonics
High Level LanguageHuman Understandable Language
Procedure/Structural language
Global data
Concentrate on functions.
Object oriented programming language
OOPS concepts.
The OOPS concepts are
Data hiding
Data encapsulation
Data abstraction
Inheritance
Polymorphism
Objects
Class
Dynamic binding
Message passing.
The detailed view of oops concepts is discussed later.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
Discount

On special offer

Partial preview of the text

Download Ooad notes and more Study notes Object Oriented Analysis and Design in PDF only on Docsity!

UNIT-I

Introduction:

The various trends in S/W development give the change in the languages. In earlier days S/W developers used Machine Languages, which deals with 0’s and 1’s [Binary Number]. S/W developers felt it was difficult to program using binary numbers. In later stage Assembly Language was used for a programming. Assembly Language uses mnemonics, which is better than binary language. Then high-level language was introduced. The human understandable English is used in the programming languages. Initial stages of high-level languages have the procedural /structural languages. Programmers concentrate more on functions rather than data. To overcome this object oriented programming languages was introduced. In OOProgramming the programmer concentrate or gives equal importance to functions and data. The advantages over procedure languages are OOPS concepts.

Machine Language0, ↓ Assembly LanguageMnemonics ↓ High Level LanguageHuman Understandable Language

Procedure/Structural language Global data Concentrate on functions.

Object oriented programming language OOPS concepts.

The OOPS concepts are

Data hiding Data encapsulation Data abstraction Inheritance Polymorphism Objects Class Dynamic binding Message passing.

The detailed view of oops concepts is discussed later.

OBJECT ORIENTATION:

Object oriented methods enable us to create sets of objects that work together synergistically to produce software that better module their problem domains than similar systems produced by traditional techniques. The system created using object oriented methods are easier to adapt changing requirements, easier to maintain, more robust, promote greater design. The reasons why object orientation works

 High level of abstraction. Seamless transition among different phases of software development. Encourage of good programming techniques. Promotion of reusability.

High level of abstraction:

Top-down approach It supports abstraction of the function level.

Objects oriented approach  It supports abstraction at the object level. The object encapsulate both the data (attributes) and functions (methods), they work as a higher level of abstraction. The development can proceed at the object level, this makes designing, coding, testing, and maintaining the system much simpler.

Seamless transition among different phases of software development

Traditional Approach:

The software development using this approach requires different styles and methodologies for each step of the process. So moving from one phase to another requires more complex transistion.

Object-oriented approach:

We use the same language to talk about analysis, design, programming and database design. It returns the level of complexity and reboundary, which makes clearer and robust system development.

Encouragement of good programming techniques:

A class in an object-oriented system carefully delineates between its interface and the implementation of that interface. The attributes and methods are encapsulated within a class (or) held together tightly. The classes are grouped into subsystems but remain independent one class has no impact on other classes. Object oriented approach is not a magical one to promote perfect design (or) perfect code.

Review of objects:

The object-oriented system development makes software development easier and more natural by raising the level of abstraction to the point where applications can be implemented. The name object was chosen because “everyone knows what is an object is ”. The real question is “what do objects have to do with system development” rather that “what is an object?”

Object: A car is an object a real-world entity, identifiably separate from its surroundings. A car has a well-defined set of attributes in relation to other object.

CAR  Object

Attributes Methods

Color Drive it

Manufacturer Lock it

Cost Tow it

Owner Carry Passenger in it

Attributes:  Data of an object.  Properties of an object.

Methods:  Procedures of an object. or  Behaviour of an object.

The term object was for formal utilized in the similar language. The term object means a combination or data and logic that represent some real-world entity. When developing an object oriented applications, two basic questions arise

 What objects does the application need? What functionality should those objects have?

Programming in an object-oriented system consists of adding new kind of objects to the system and defining how they behave. The new object classes can be built from the objects supplied by the object-oriented system.

Object state and properties (Attributes):

Properties represent the state of an object. In an object oriented methods we want to refer to the description of these properties rather than how they are represented in a particular programming language.

Attributes of car object

We could represent each property in several ways in a programming languages.

For example: Color 1. Can be declared as character to store sequence or character [ex: red, blue, ..]

  1. Can declared as number to store the stock number of paint [ex: red paint, blue paint, ..]
  2. Can be declared as image (or) video file to refer a full color video image.

The importance of this distinction is that an object abstract state can be independent of its physical representation.

Object Behaviour and Methods:

We can describe the set of things that an object can do on its own (or) we can do with it.

For example: Consider an object car,  We can drive the car.  We can stop the car.

Each of the above statements is a description of the objects behaviour. The objects behaviour is described in methods or procedures. A method is a function or procedures that is defined in a class and typically can access to perform some operation. Behaviour denotes the collection of methods that abstractly describes what an object is capable of doing. The object which operates on the method is called receiver. Methods encapsulate the behaviour or the object, provide interface to the object and hide any of the internal structures and states maintained by the object. The procedures provide us the means to communicate with an object and access it properties.

Car Cost Color Make Model

For example:

Employee Class

David

John

Andrew Objects of

Align class employee

Alfred Class Hierarchy:

An object-oriented system organizes classes into a subclass super class hierarchy. The properties and behaviours are used as the basis for making distinctions between classes are at the top and more specific are at the bottom of the class hierarchy. The family car is the subclass of car. A subclass inherits all the properties and methods defined in its super class.

Private Govt Mini Heavy Race Family Omni Passenger Lorry Truck Car Car Bus Bus Super class/Subclass Hierarchy

Inheritance:

It is the property of object-oriented systems that allow objects to be built from other objects. Inheritance allows explicitly taking advantage of the commonality of objects when constructing new classes. Inheritance is a relationship between classes where one class is the parent class of another (derived) class. The derived class holds the properties and behaviour of base class in addition to the properties and behaviour of derived class.

Motor Vehicle

Bus Truck Car

Inheritance allows reusability.

Dynamic Inheritance: Dynamic inheritance allows objects to change and evolve over time. Since base classes provide properties and attributes for objects, hanging base classes changes the properties and attributes of a class.

Example: A window objects change to icon and basic again. When we double click the folder the contents will be displayed in a window and when close it, changes back to icon. It involves changing a base class between a windows class and icon class.

Multiple Inheritances: Some object-oriented systems permit a class to inherit its state (attributes) and behaviour from more than one super class. This kind or inheritance is referred to as multiple inheritances.

For example: Utility vehicle inherits the attributes from the Car and Truck classes.

Vehicle

Hyundai

Car

Santro Sonata Accent

Vehicle

Utility Vehicle

Truck Car Bus

Can fly

Flown by

A pilot “can fly” planes. The inverse of can fly is “is flown by “. Plane “is flown by” pilot

Cardinality:

It specifies how many instances of one class may relate to a single instance of an associated class. Cardinality constrains the number of related objects and often is described as being “one” or “many”.

Consumer-producer association:

A special form or association is a consumer-producer relationship, also known as a client-server association (or) a use relationship. It can be viewed as one-way interaction. One object requests the service or another object. The object that makes the request is the consumer or client and the object that receives the request and provides the service is the producer (or) server

Example:

Request for

Printing

The consumer-producer association we have a print object that prints the consumer object. The print producer provides the ability to print other objects.

Aggregations:

All objects, except the most basic ones, are composed of and may contain other objects. Breaking down objects in to the objects from which they are composed is de composition. This is possible because an objects attributes need not be simple data fields, attributes can reference other objects. Since each object has an identity, one object can refer to other objects. This is known as aggregation. The car object is an aggregation of other objects such as engine, seat and wheel objects.

Pilot Planes

Print Server Item

Static and Dynamic Binding:

Determining which function has to be involved at compile time is called static binding. Static binding optimized the calls. (Ex) function call.

The process of determining at run time which functions to involve is termed dynamic binding. Dynamic binding occurs when polymorphic call is issued. It allows some method invocation decision to be deferred until the information is known.

Example: Cut operation in a edit submenu. It pass the cut operation to any object on the desktop, each or which handles the message in its own way.

Object Persistence:

Objects have a lifetime. They are explicitly created and can exist for a period of time that has been the duration of the process in which they were created. A file or database can provide support for objects having a longer lifeline, longer than the duration of the process for which they are created. This characteristic is called object persistence.

Meta-Classes:

In an object-oriented system every thing is an object, what about a class? Is a class an object?. Yes, a class is an object. So, If it is an object, it must belong to a class, such a class belong to a class called a meta-class (or) class or classes.

Engine Seat Wheel

Car

Transformation 1

Transformation 2

Transformation 3

Transformation 1 [Analysis]

It translates the users’ needs into system requirements and responsibilities. The way they use can provide insight into user requirements.

Transformation 2 [Design]

It begins with a problem statement and ends with a detailed design that can be transformed into an operational system. This transformation includes the bulk of the software development activity, including definition of how to build the software, its development and it’s testing. It includes the design descriptions, the program and the testing materials.

Transformation 3 [Implementation]

It refines the detailed design into the system deployment that will satisfy the users needs. It represents embedding the software product within its operational environment.

The software development process is the waterfall approach which starts with deciding what is to be done (what is the problem)  How to accomplish them  Which we do it  Test the result to see it we have satisfied the users requirements  Finally we use what we have done

What are the users of the system?

Problem

Statements

Analysis

System

Software

Product

Design

Implementation

Detail

Analysis

Design

Implementation

Testing

Maintenance The water fall S/W development process

Building High-Quality Software

The software process transforms the users needs via the application domain to a software solution that satisfies those needs. High-Quality products must meet users needs and expectations. The quality of the product should be improved prior to delivery rather than correcting them after deliver.

To achieve high quality software we need to be able to answer the following question.

 How do we determine when the system is ready for delivery?

 It is now operational system that satisfies uses needs?

 It is correct and operating as we thought it should?

 Does it pass an evaluation process?

There are different approaches for systems testing. Blum describes a means of system evaluation in terms of four quality measures,

 Correspondence  Correctness  Verification and  Validation

What

Test

How

Use

Do It

Iteration and Reuse

The use-case model can be employed throughout most activities of software development. The main advantage is that all design decisions can be traced back directly to user requirements.

 Object-oriented Analysis – Use case driven  Object-oriented design  Prototyping  Component-based development  Incremental testing

Object-Oriented Analysis –Use-Case Driven:

The object-oriented analysis phase of S/W development is concerned with determing the system requirements and identifying classes and their relationship to other classes in the problem domain. To understand the system requirements we need to identify the users or the actors. Who are the actors and how do they use the system, scenarios are used to help analysis to understand the requirements. Ivar Jacobson came up with the concept of the use case, his name for scenario to describe user-computer system inter action. The object-oriented community has adopted use case to a remarkable degree.

Analysis

Implementation

Design

Validation test

Build a Use- Case model

Build User Interface & Prototype

User satisfaction Usability test & quality assurance test

Object Analysis

Using Tools CASE and/or OO Programming languages

Design Classes Define Attributes & Methods

Build Object and Dynamic Model

User Satisfaction Usability & QA Tests

Scenarios are a great way of examine who does what in the interactions among objects and what role they play. That is their inert relationship. This inter actions among the objects roles to achieve a given goal is called collaboration.

A use-case is a typical interaction between a user and a system that captures user goals & needs. Expressing these high-level processes and interactions it is referred to as use-case modeling. Once the use case model is better understood and developed we should start to identify classes and create their relationships.

The physical objects in the system also provide us important information an objects in the system. The objects could be individuals’ organizations, machines, units of information; pictures (or) what ever else makes up the application and makes sense in the context of the real-world system.

For example: The object in the payroll system is as follows,  The employee, worker, supervisor, office admin.  The paycheck.  The product being made.  The process used to make the product.

The objects need to have meaning only within the context of the application domain.

Few guide lines to use in object-oriented design.  Reuse, rather than build, anew class, know the existing classes.  Design a large number of simple numbers of simple classes, rather than a small number of complex classes.  Design methods.  Critique what we have proposed. It possible go back and refine the classes.

Prototyping:

It is important to construct a prototype of some of the key system components shortly after the products are selected. A prototype is a version of a software product developed in the early stages of the product’s life cycle for specific, experimental purposes. It enables to fully understand how easy or difficult it will be to implement some of the features of the system. It gives users a chance to comment on the usability and usefulness of the user interface design, it can define use cases and it makes use Case modeling much easier.

Prototyping was used as a “quick and dirty” way to test the design, user interface and so forth, something to be thrown away when the “industrial strength” version was developed. The rapid application development (RAD) refines the prototype into the final product.

Prototypes have been categorized in various ways. The following categorized are some of the commonly accepted prototypes.

To give management and everyone connected with the project the first glimpse of what the technology can provide. Prototyping is a useful exercise of almost any stage of the development. Prototyping should be done in parallel with the preparation of the functional specification. It also results in modification to the specification.

Implementation:

Software components are built and tested in-house, using a wide range of technologies. Computer aided software engineering (CASE) tools allow their users to rapidly develop information systems. The main goal of CASE technology is the automation of the entire information system’s development life cycle process using a set of integrated software tools, such as modeling, methodology and automatic code generation. The code generated by CASE tools is only the skeleton of an application and a lot needs to be filled in by programming by hand.

Component-Based Development: (CBD)

CASE tools are the beginning of Component-Based Development. Component-Based Development is an industrialized approach to the software development process. Application development to assembly of prebuilt, pretested, reusable software components that operate with each other: The two basic ideas of using Component-Based development.

  1. The application development can be improved significantly if applications can be assembled quickly from prefabricated software components.
  2. An increasingly large collection of interpretable software components could be made available to developers in both general and specified catalogs.

A CBD developer can assemble components to construct a complete software system. The software components are the functional units of a program, building blocks offering a collection of reusable services. The object-Oriented concept addresses analysis, design and programming, where as component-Based development is concerned with the implementation and system integration aspects of software development.

Rapid Application Development (RAD):

RAD is a set of tools and techniques that can be used to build application footer than typically possible with traditional methods. The term is often conjunction with S/W prototyping. RAD encourages the incremental development approach of “grow, do not build” software.

Testing: (Refer Software Engineering Book )

Design Patterns: