ppt_OOAD_OOAD1unit-1

Views:
 
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

Unit – 1 (Introduction to OOAD):

Unit – 1 (Introduction to OOAD) An overview of object oriented systems development. Object basics object oriented systems development life cycle 1

Important Programming Models:

Important Programming Models Procedure Oriented Algorithms Object Oriented  Classes & Objects 2

Algorithm Analysis:

3 Algorithm Analysis 1.Space efficiency 2.Time efficiency 2.1 Worst case efficiency 2.2 Best case efficiency 2.3 Average case efficiency

Algorithm analysis (Continued…):

4 Algorithm analysis ( Continued… ) 1. Worst case efficiency It is the efficiency for worst case input ( worst case input is the one for which the algorithm runs longest). 2. Best case efficiency It is the efficiency for best case input ( best case input is the one for which the algorithm runs fastest). 3. Average case efficiency It is the efficiency for Average case input

Algorithm analysis (Continued…):

5 Algorithm analysis ( Continued… ) Case 1: If the algorithm is depending only on the input size , we need not to find best,worst and average case efficiencies separately. Case 2: If the algorithm is depending not only on the input size ,bust also some factors then find we have to fine worst,best and average case efficiencies separately.

Slide 6:

Differentiate OOP, OOA & OOD. 6

Object Oriented Programming:

Object Oriented Programming A language is object oriented if and only if it satisfies the following requirements: 1.Supports objects 2.Objects have a class 3.Class may inherit attributes from super class. 7

Object Oriented Analysis:

Object Oriented Analysis It is a method of analysis that examines requirements from the users. ….contd 8

Object Oriented Design:

Object Oriented Design It leads to an object –oriented decomposition. Uses different notations to express different models. 9

Introduction:

Introduction System development refers to all activities that produces the solution. System development activities consists of analysis, modeling, design, implementation, testing & maintenance. A software development methodology is a series of processes that, if followed , can lead to the development of an application. 10

Object Model:

Object Model The main principles of object model are a) abstraction b) encapsulation c) modularity d) hierarchy e) typing f) concurrency g) persistence 11

Major Elements of Object Model:

Major Elements of Object Model a) abstraction b) encapsulation c) modularity d) hierarchy 12

Minor Elements of Object Model:

Minor Elements of Object Model a) typing b) concurrency c) persistence 13

a) What is Abstraction?:

a) What is Abstraction? It focuses upon the essential characteristics of objects. (e.g.) Project Abstract 14

b) What is Encapsulation?:

b) What is Encapsulation? Hides the details of the implementation (data & procedure) of an object (e.g.) Hides the details of the implementation from clients. - Provides the interface. 15

c) What is Modularity?:

c) What is Modularity? The breaking up of something complex into manageable pieces Effective Modular design 1.Cohesion 2.Coupling 16

d-1) What is Hierarchy? :

d-1) What is Hierarchy? Ranking or Ordering of abstraction 17 Decreasing abstraction Increasing abstraction Vehicle Elements at the same level of the hierarchy should be at the same level of abstraction Car Ford Mustang Taurus Thunderbird

d-2) What is Hierarchy? :

d-2) What is Hierarchy? At the top of the hierarchy are the most general classes. At the bottom are the most specific. A subclass inherits all of the properties & methods from the superclass . 18

e) Typing :

e) Typing It is the enforcement of the class of an object, such that objects different types may not be interchanged, or at the most , they may be interchange only in very restricted ways. Strong typing prevents mixing abstractions. 19

f) Concurrency:

f) Concurrency It allows different objects to act at the same time. It’s the property that distinguishes an active object from one that is not active. 20

g) Persistence:

g) Persistence It is the property of an object through which the object continues exists after its creator ceases to exists and / or the objects location moves from the address phase in which it was created. 21

Basic Concepts of Object Orientation:

Basic Concepts of Object Orientation Object Class Attribute (Property) Method (Procedure) Inheritance Interface (Polymorphism) Relationships 22

1a) What is an Object?:

1a) What is an Object? It is a combination of data & logic that represents some real world entity, either physical, conceptual, or software Physical entity (e.g.) car Conceptual entity (e.g.) chemical process Software entity (e.g.) linked list 23

1b) Representing Objects:

1b) Representing Objects An object is represented as rectangles with underlined names 24 : Professor Professor Nandhini ProfessorNandhini: Professor ProfessorNandhini Object Name Only Class and Object Name Class Name Only

2a) What is a Class?:

2a) What is a Class? A class is a set of objects with common properties (attributes), behavior (operations), and relationships - An object is an instance of a class 25

2b) Representing Classes:

2b) Representing Classes A class is represented using a compartmented rectangle 26 Professor Professor Rani a + b = 10

2c) Class Compartments:

2c) Class Compartments A class is comprised of three sections The first section contains the class name The second section shows the structure (attributes) The third section shows the behavior (operations) 27 Professor name empID create( ) save( ) delete( ) change( ) Class Name Attributes Operations

2d)The Relationship Between Classes and Objects:

2d)The Relationship Between Classes and Objects Objects are grouped into classes 28 Objects Professor Smith Professor Jones Professor Mellon Class Professor

3 What is an Attribute?:

3 What is an Attribute? 29 Class Example Attributes Car Cost Color Manufacturer Model Another name – properties It describe the state (data) of an object.

Slide 30:

Define its behavior (what an object is capable of doing). 30 CourseOffering addStudent deleteStudent getStartTime getEndTime Class Operation 4) What is method (or) procedure?

5a) Inheritance:

5a) Inheritance It allows objects to be built from other objects. It is a relational ship between classes. (one class is the parent of other ( derived ) class. The parent class is also known as the base class (or) super class . 31

5b) Example: Single Inheritance:

5b) Example: Single Inheritance One class inherits from another 32 Account balance name number Withdraw() CreateStatement() Checking Withdraw() Savings GetInterest() Withdraw() Superclass (parent) Subclasses Generalization Relationship Ancestor Descendents

5c) Multiple Inheritance:

5c) Multiple Inheritance Some OO systems permit a class to inherit its state (attributes) and behaviors from more than one super class. 33 Vehicle Car Bus Truck Utility Vehicle

5d) Example: Multiple Inheritance:

5d) Example: Multiple Inheritance A class can inherit from several other classes 34 Airplane Helicopter Wolf Horse FlyingThing Animal Bird multiple inheritance Use multiple inheritance only when needed, and always with caution !

6) What is Polymorphism ?:

6) What is Polymorphism ? Poly means “many” Morph means “form” Polymorphism  the same operation may behave differently on different classes. Booch defines Polymorphism as the relationship of objects of many different classes by some common super class. 35

7a) Relationships:

7a) Relationships Association Aggregation Dependency Generalization Realization 36

Slide 37:

37 Professor University Works for Class Association Association Name Professor University Employer Employee Role Names 7b)Relationships: Association It represents the relationships between objects & classes.

Slide 38:

38 Employer Employee 7c)Relationships: Association It is rendered as a solid line. It has a name & a role. Person Company Person Company Works for Association ROLES ASSOCIATION NAMES Name Direction Name Association Role Name

Slide 39:

39 7d)Relationships: Aggregation A special form of association that models a whole-part relationship between an aggregate (the whole) and its parts

Slide 40:

40 College Department Whole Aggregation Part 7e) Relationships: Aggregation (e.g.)

Slide 41:

41 Engine wheel 7f) Relationships: Aggregation (e.g.) a car object of other objects such as engine, seat and wheel objects. Car Seat

Slide 42:

42 Client Supplier Class Dependency relationship 7g) Relationships: Dependency A relationship between two model elements where a change in one may cause a change in the other Non-structural, “using” relationship

7h) Relationships: Generalization:

7h) Relationships: Generalization It is a relationship between a general thing (called the super class or parent) & a more specific kind of that thing (called the subclass or child) Generalization is an “is-a-kind of” relationship 43

7j) Relationships: Generalization:

7j) Relationships: Generalization 44 Shape origin move( ) resize( ) display( ) Rectangle Corner : Point Circle Corner : Point Polygon Points : List Display Square Leaf class Generalization Base class

7k) Relationships: Realization:

7k) Relationships: Realization 45 Use Case Use-Case Realization Canonical form b) It is used for tracebility

Slide 46:

46 (continued) 8) Review: Introduction to Object Orientation What are the four basic principles of object orientation? Provide a brief description of each. What is an Object and what is a Class? What is the difference between them? What is an Attribute? What is an Operation? What is an Interface? What is Polymorphism? Name the 4 basic UML relationships and describe each. Describe the strengths of object orientation.

Software Development Life Cycle:

Software Development Life Cycle System development refers to all activities that produces the solution. System development activities consists of analysis, modeling, design, implementation, testing & maintenance. A software development methodology is a series of processes that, if followed , can lead to the development of an application. 47

2e) Software Development Process:

2e) Software Development Process Linear Sequential Model (Or) Waterfall model Prototyping model Evolutionary Model Incremental model Spiral model WIN - WIN model Object oriented model 48

Slide 49:

49 Linear Sequential Model

Slide 50:

(e.g.) The waterfall software development process 50 What How Do It Test Use

Prototyping Model:

Prototyping Model 51 Customer Communication Quick Design Build Prototype Customer evaluation of Prototype

Slide 52:

52 a n a l y s i s d e s i g n c o d e t e s t a n a l y s i s d e s i g n c o d e t e s t a n a l y s i s d e s i g n c o d e t e s t a n a l y s i s d e s i g n c o d e t e s t increment 2 increment 3 increment 4 increment 1 delivery of 1st increment delivery of 2nd increment delivery of 3rd increment delivery of 4th increment calendar time Incremental Model

Spiral Model:

Spiral Model 53

3a) OO System Development : A Usecase Driven Approach:

3a) OO System Development : A Usecase Driven Approach 54 Using CASE Tools and/or OO programming languages Build a Use-Cases model Object analysis Validate test Design classes, define attributes and methods Build object model Build User Interface & Prototype User satisfaction & Quality test User satisfaction & Quality test

3b) OO System Development : A Usecase Driven Approach:

3b) OO System Development : A Usecase Driven Approach OO System Development includes the following activities: OO Analysis OO Design Prototyping Component based development Testing 55

4c) OO Analysis:

4c) OO Analysis OO analysis includes the following activities: Determining the system requirements. Identifying classes and their relationship to other class in the problem domain. 56

4d) OO Design:

4d) OO Design OO Design includes the following activities: Design the classes. Design the user interface 57

4e) OO Design - Guidelines:

4e) OO Design - Guidelines Reuse rather than build a new class. Design a large no. of simple classes rather than a small no. of complex classes. Design methods. Critique what you have proposed. If possible, go back & refine the classes. 58

4f) Prototyping:

4f) Prototyping A version of a software product developed in the early stage of the products life cycle for specific, experimental purposes. Easy to understand Types of Prototyping 1.Close ended (or) Throwaway 2.Open ended (or) Evolutionary 59

Slide 60:

60 4g) Testing 1.White box testing 2.Black box Testing

Slide 61:

THANK YOU! 61