0% found this document useful (0 votes)
66 views32 pages

CSF213 L27

The document discusses the software development process and object-oriented design. It covers the three phases of software development: analysis, design, and implementation. It also discusses class relationships like association, aggregation, inheritance, and dependency. The key relationships between classes are modeled using Unified Modeling Language connectors.

Uploaded by

Nilayan Ahmed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views32 pages

CSF213 L27

The document discusses the software development process and object-oriented design. It covers the three phases of software development: analysis, design, and implementation. It also discusses class relationships like association, aggregation, inheritance, and dependency. The key relationships between classes are modeled using Unified Modeling Language connectors.

Uploaded by

Nilayan Ahmed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 32

BITS Pilani

BITS Pilani
Hyderabad Campus

Dr.Aruna Malapati Asst Professor Department of CSIS

BITS Pilani
Hyderabad Campus

Object Oriented Design Process

Todays Agenda
Software Development Process Class Relationships UML Connectors Example

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Software Development Activities


When the code for your programs starts getting big, with numerous .java files, you will have to start thinking about how to manage it all. Software development effort consists of four basic development activities 1. establishing the requirements: 2. creating a design 3. implementing the design

4. testing

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Software Development Process


Three Phases 1. 2. 3. Analysis Design Implementation

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Analysis Phase
Goal : Complete Description of What the Software Product Should do? Result of Analysis Phase is detailed a textual description [Functional Specification]

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Design Phase
Goals: 1. 2. 3. Identification of Classes Identification of Responsibilities of each class Identification of Relation ships among various classes

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Implementation
Goal: 1. Programming (Coding Phase) 2. 3. Testing Deployment

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

"Programming in the Small" and "Programming in the Large"


Programming in the small
Programs are developed by a single programmer or perhaps a small group of programmers. All aspects of the project can be understood by a single individual. The major problem is the development of the algorithms and data structures needed to solve the task at hand.

Programming in the large


The software system is developed by a large team of programmers, often with considerable specialization. No single individual can (likely) understand all aspects of the project. The major problem is the coordination of the diverse aspects of the project--people and software systems.
CS/IS F213 First Semester 2012-13 BITS Pilani, Hyderabad Campus

Object Orientation
We will approach the design of programs from an objectoriented perspective. Key idea (notion?) in object orientation: The real world can be accurately described as a collection of objects that interact. Assumptions:
Describing large, complex systems as interacting objects make them easier to understand than otherwise. The behaviors of real world objects tend to be stable over time. The different kinds of real world objects tend to be stable. (That is, new kinds appear slowly; old kinds disappear slowly.) Changes tend to be localized to a few objects.
CS/IS F213 First Semester 2012-13 BITS Pilani, Hyderabad Campus

An Object Model
Our object model includes four components: objects (i.e., abstract data structures) classes (i.e., abstract data types) inheritance (hierarchical relationships among ADTs) polymorphism by inheritance

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Whats Object?
Object is characterized by 1. 2. 3. State [Collection of all information] Behavior [Operations, Responsibilities] Identity [ Unique Attribute] Class is collection of objects with same behavior and attributes An Object is simply an instance of Class
CS/IS F213 First Semester 2012-13 BITS Pilani, Hyderabad Campus

Nearly anything can be an object

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

What are classes?


A class describes a group of objects with
similar properties (attributes), common behaviour (operations), common relationships to other objects, and common meaning (semantics).

Examples
employee: has a name, employee# and department; an employee is hired, and fired; an employee works in one or more projects

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Objects vs. Classes


Objects are represented as:

Two different objects may have identical attribute values (like two people with identical name and address)

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Associations
Objects do not exist in isolation from one another The concept of association represents relationships between objects and classes. In UML, there are different types of relationships:
Association Aggregation and Composition Generalization Dependency Realization

Note: The last two are not useful during requirements analysis
CS/IS F213 First Semester 2012-13 BITS Pilani, Hyderabad Campus

Class Relationships
1. Association[Uses]

2.
3. 4.

Dependency [ Uses]
Aggregation [ hasA , a-part-of] Inheritance [ isA]

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Association
Association describes a link, a link being a connection among objects between classes. Association is shown by a solid line between classes.

A Pilot can fly a Plane


Pilot can fly Flies flown by

Role

Plane

Association name

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Association - Properties
Name
Name of the association

Role
The specific role of the association

Multiplicity
Indicates the number of objects that are connected

Type
Plain association, aggregation, composition

Direction
Direction can also be shown for a association
CS/IS F213 First Semester 2012-13 BITS Pilani, Hyderabad Campus

Notes
Name : works for Is the name of the relationship. Role : Person plays the role employee and the Company plays the role employer. Multiplicity : Many employees to one company. Type : This shows a plain association (normally referred to as association)

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Binary Association Examples


Student Registration Registered Offered To in Course

Customer

Order
Purchased Sold to

Product

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Association Multiplicity
Some examples of specifying multiplicity: Optional (0 or 1) 0..1 Exactly one Zero or more One or more A range of values 1 0..* 1..* 2..6 = 1..1 =*

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Association - Multiplicity
A Student can take up to five Courses. Student has to be enrolled in at least one course. Up to 300 students can enroll in a course. A class should have at least 10 students.

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Association - Multiplicity
A teacher teaches 1 to 3 courses (subjects) Each course is taught by only one teacher. A student can take between 1 to 5 courses. A course can have 10 to 300 students.

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Association - Multiplicity
Company can have many employees. An employee can only work for one company.

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Association - Multiplicity

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Aggregation (a-part-of)
Object Containment Composition [Strong Ownership]
1 Team 1..10 Player

Aggregation

1 Human

1 Heart Composition

1
Human

2 Eyes Composition

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

isA [Inheritance]
Inheritance Relationship [Reusability]

Account

Saving

Checking

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Dependency [Uses]
One Class depends upon another class if it manipulates the Objects of another class

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

UML Connectors
Uses Aggregation Composition Association Directed Association Inheritance

Interface Implementation
CS/IS F213 First Semester 2012-13 BITS Pilani, Hyderabad Campus

Class Diagrams

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

Summary
Software development process consists of three major phases. While the transition of programming in small to large managing the classes is difficult and hence we use design phase. Classes and objects in an application do not exist on their own but they will have to interact to do a task and hence relationshiph exists between them.

CS/IS F213 First Semester 2012-13

BITS Pilani, Hyderabad Campus

You might also like