SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Lab Manual OOAD
OOAD LAB MANUAL
Sukanya Roychowdhury
Lecturer
Pillai’s Institute Of Information Technology
Sukanya Roychowdhury
Lab Manual OOAD
Introduction
In late 1960‘s people were concentrating on Procedure Oriented Languages such as COBOL, FORTRAN,
PASCAL…etc. Later on they preferred Object Oriented Languages. In the middle of 1970-80 three
Scientists named as BOOCH, RUMBAUGH and JACOBSON found a new language named as Unified
Modeling Language. It encompasses the Designing of the System/Program. It is a Defacto language.
What is UML?
• Is a language. It is not simply a notation for drawing diagrams, but a complete language for
capturing knowledge (semantics) about a subject and expressing knowledge (syntax) regarding the
subject for the purpose of communication.
• Applies to modeling and systems. Modeling involves a focus on understanding a subject (system) and
capturing and being able to communicate in this knowledge.
• It is the result of unifying the information systems and technology industry‘s best
engineering practices (principals, techniques, methods and tools).
• used for both database and software modeling
Overview of the UML
• The UML is a language for
– visualizing
– specifying
– constructing
– documenting
Sukanya Roychowdhury
Lab Manual OOAD
The artifacts of a software-intensive system
Visual modeling (visualizing)
• A picture is worth a thousand words!
- Uses standard graphical notations
- Semi-formal
- Captures Business Process from enterprise information systems to distributed
Web-based applications and even to hard real time embedded systems
Specifying
• building models that are: Precise, Unambiguous, Complete
• UML symbols are based on well-defined syntax and semantics.
• UML addresses the specification of all important analysis, design, and implementation
decisions.
Constructing
• Models are related to OO programming languages.
• Round-trip engineering requires tool and human intervention to avoid information loss
– Forward engineering — direct mapping of a UML model into code.
– Reverse engineering — reconstruction of a UML model from an
implementation.
Documenting
– Architecture, Requirements, Tests, Activities (Project planning, Release management)
Sukanya Roychowdhury
Lab Manual OOAD
Conceptual Model of the UML
» To understand the UML, you need to form a conceptual model of
the language, and this requires learning three major elements.
Elements:
1. Basic building blocks
2. Rules
3. Common Mechanisms
Basic Building Blocks of the UML
The vocabulary of the UML encompasses three kinds of building blocks:
» Things
» Relationships
» Diagrams
1.Structural Things
• These are the Nouns and Static parts of the model.
• These are representing conceptual or physical elements.
There are seven kinds of structural things:
1. Class
2. Interface
3. Collaboration
4. Use Case
5. Active Class
6. Component
7. Node
1.Class
Is a description of set of objects that share the same attributes, operations methods, relationships
and semantics.
Sukanya Roychowdhury
Lab Manual OOAD
Window
Origin
Size
Open ( )
Close ( )
Move ( )
Name
Attributes
Operations
A Simple Class
Sukanya Roychowdhury
2.Interface
A collection of operations that specify a service (for a resource or an action) of a class or component. It
describes the externally visible behavior of that element
Nam
<<interface>>
Iwindow
Iname
Operation Open ()
Close ()
A Simple Interface
3.Collaboration
– Define an interaction among two or more classes.
– Define a society of roles and other elements.
– Provide cooperative behavior.
– Capture structural and behavioral dimensions.
– UML uses ‗pattern‖ as a synonym (careful)
4.Use Case
Name
Behavior
– A sequence of actions that produce an observable result for a specific actor.
– A set of scenarios tied together by a common user goal.
– Provides a structure for behavioral things.
– Realized through a collaboration (usually realized by a set of actors and the system to be built).
Place
order
5. Active Class
– Special class whose objects own one or more
processes or threads.
– Can initiate control activity.
Heavy border
Event
Manager
Name
Thread
Attributes
Operations
Time
Suspend ()
Flush ()
6. Component
• Replaceable part of a system.
• Components can be packaged logically.
• Conforms to a set of interfaces.
• Provides the realization of an interface.
• Represents a physical module of code
7. Node
• Element that exists at run time.
• Represents a computational resource.
• Generally has memory and processing power.
Orderform.java
Web Server
1.Interaction
• Is a behavior of a set of objects comprising of a set of messages exchanges within a particular context to
accomplish a specific purpose.
Display
2.State Machine
• Is a behavior that specifies the sequences of states an object or an interaction goes through during its lifetime
in response to events, together with its responses to those events.
Idle Waiting
3.Grouping Things
• These are the organizational parts of the UML models.
● There is only one primary kind of group thing:
1.Packages
- General purpose mechanism for organizing elements into groups.
- Purely conceptual; only exists at development time.
- Contains behavioral and structural things.
- Can be nested.
- Variations of packages are: Frameworks, models, & subsystems.
Business rules
4.Annotational Things
• These are Explanatory parts of UML models
• These are the Comments regarding other UML elements (usually called adornments in UML)
There is only one primary kind of annotational thing:
1. Note
A note is simply a symbol for rendering constraints and comments attached to an
element or collection of elements.
Is a best expressed in informal or formal text.
Comments
Relationships
There are four kinds of relationships:
1. Dependency
2. Association
3. Generalization
4. Realization
» These relationships tie things together.
» It is a semantic connection among elements.
» These relationships are the basic relational building blocks of the UML.
1. Dependency
Is a semantic relationship between two things in which a change to one thing (the independent thing) may affect
the semantics of the other thing (the dependent thing).
2.Association
Is a structural relationship that describes a set of links, a link being a connection among
objects.
employer employee
0...1 *
Aggregation
» Is a special kind of association. It represents a structural relationship
between the whole and its parts.
» Represented by black diamond.
3.Generalization
Is a specialization/generalization relationship in which objects of the specialized element (the
child) are more specific than the objects of the generalized element.
Diagrams
• A diagram is the graphical presentation of a set of elements.
• Represented by a connected graph: Vertices are things; Arcs are behaviors.
UML includes nine diagrams:
• Class Diagram;
• Object Diagram
• Use case Diagram
• Sequence Diagram;
• Collaboration Diagram
• State chart Diagram
• Activity Diagram
• Component Diagram
• Deployment Diagram
Both Sequence and Collaboration diagrams are called Interaction Diagrams.
Experiment No:1:
Aim: To implement Inheritance
Inheritance is the concept that when a class of object is defined, any subclass that is
defined can inherit the definitions of one or more general classes. This means for the
programmer that an object in a subclass need not carry its own definition of data and
methods that are generic to the class (or classes) of which it is a part. This not only
speeds up program development; it also ensures an inherent validity to the defined
subclass object (what works and is consistent about the class will also work for the
subclass).
The simple example in C++ is having a class that inherits a data member from its parent
class.
class A
{
public:
integer d;
};
class B : public A
{
public:
};
The class B in the example does not have any direct data member does it? Yes, it does. It
inherits the data member d from class A. When one class inherits from another, it
acquires all of its methods and data. We can then instantiate an object of class B and call
into that data member.
void func()
{
B b;
b.d = 10;
};
Experiment No. 2:
Aim : To Implement Polymorphism
In object-oriented programming, polymorphism (from the Greek meaning "having
multiple forms") is the characteristic of being able to assign a different meaning to a
particular symbol or "operator" in different contexts.
The simple example is two classes that inherit from a common parent and implement the
same virtual method.
class A
{
public:
virtual void f()=0;
};
class B
{
public:
virtual void f()
{std::cout << "Hello from B" << std::endl;};
};
class C
{
public:
virtual void f()
{std::cout << "Hello from C" << std::endl;};
};
If I have an object A, then calling the method f() will produce different results depending
on the context, the real type of the object A.
func(A & a)
{
A.f();
};
Experiment No: 3
Aim: Class Diagram
• Class Diagrams describe the static structure of a system, or how it is structured rather than how it behaves.
• A class diagram shows the existence of classes and their relationships in the logical view of a system
These diagrams contain the following elements.
– Classes and their structure and behavior
– Association, aggregation, dependency, and inheritance relationships
– Multiplicity and navigation indicators
– Role names
These diagrams are the most common diagrams found in O-O modeling systems.
Examples:
Registration
Student
Experiment No: 4
Aim: Object Diagrams
• Shows a set of objects and their relationships.
• A static snapshot of instances.
• Object Diagrams describe the static structure of a system at a particular time.
Whereas a class model describes all possible situations, an object model describes
a particular situation.
Object diagrams contain the following elements:
Objects which represent particular entities. These are instances of classes.
Links which represent particular relationships between objects. These are instances of
associations.
Harry
(Student)
Name:” Harry Mat”
Major: C.S
Experiment No: 5
Aim: Use case diagrams
Use Case Diagrams describe the functionality of a system and users of the system.
These diagrams contain the following elements:
Actors: which represent users of a system, including human users and other systems.
Use Cases: which represent functionality or services provided by a system to users.
Registrar Student
Maintain
Experiment No: 6
Aim: Sequence Diagrams
● Sequence Diagrams describe interactions among classes. These interactions are modeled as exchanges
of messages.
● These diagrams focus on classes and the messages they exchange to accomplish
Some desired behavior.
● Sequence diagrams are a type of interaction diagrams. Sequence diagrams
contain the following elements:
Class roles: which represent roles that objects may play within the interaction.
Lifelines: which represent the existence of an object over a period of time.
Activations: which represent the time during which an object is performing an operation.
Messages: which represent communication between objects.
Experiment No: 7
Aim: Collaboration Diagram
Collaboration Diagrams describe interactions among classes and associations. These interactions
are modeled as exchanges of messages between classes
Through their associations. Collaboration diagrams are a type of interaction
Diagram.
Collaboration diagrams contain the following elements.
Cass roles: which represent roles that objects may play within the interaction.
Association roles: which represent roles that links may play within the interaction.
Message flows: which represent messages sent between objects via links. Links transport or implement the
delivery of the message.
Experiment No: 8
Aim: Statechart Diagrams
State chart (or state) diagrams describe the states and responses of a class. Statechart
Diagrams describe the behavior of a class in response to external stimuli.
These diagrams contain the following elements:
States: which represent the situations during the life of an object in which it satisfies some condition,
performs some activity, or waits for some occurrence.
Transitions: which represent relationships between the different states of an object.
Experiment No: 9
Aim: Activity Diagrams
Activity diagrams describe the activities of a class. These diagrams are similar to Statechart
diagrams and use similar conventions, but activity diagrams describe the behavior of a class in
response to internal processing rather than external events as in Statechart diagram.
Swimlanes: which represent responsibilities of one or more objects for actions within an overall activity; that is,
they divide the activity states into groups and assign these groups to object that must perform the activities.
Action States: which represent atomic, or noninterruptible, actions of entities or steps in the execution of
an algorithm.
Action flows: which represent relationships between the different action states of an entity.
Object flows: which represent the utilization of objects by action states and the influence of action states on
objects.
Experiment No: 10
Aim: Component Diagram
Component diagrams describe the organizations and dependencies among software
Implementation components. These diagrams contain components, which represent Distributable
physical units, including source code, object code, and executable code. These are static
implementation view of a system.
Experiment No: 11
Aim : Deployment Diagrams
Deployment diagrams describe the configuration of run-time processing resource elements and
the mapping of software implementation components onto them. These Diagrams contain
components and nodes, which represent processing or computational resources, including computers,
printers, etc.
Ooad  lab manual

Weitere ähnliche Inhalte

Was ist angesagt?

Dynamic and Static Modeling
Dynamic and Static ModelingDynamic and Static Modeling
Dynamic and Static ModelingSaurabh Kumar
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principlessaurabhshertukde
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineeringDarshit Metaliya
 
software design principles
software design principlessoftware design principles
software design principlesCristal Ngo
 
SE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design PatternsSE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design PatternsAmr E. Mohamed
 
Software Engineering - chp3- design
Software Engineering - chp3- designSoftware Engineering - chp3- design
Software Engineering - chp3- designLilia Sfaxi
 
Software Cost Estimation Techniques
Software Cost Estimation TechniquesSoftware Cost Estimation Techniques
Software Cost Estimation TechniquesSanthi thi
 
The Art Of Debugging
The Art Of DebuggingThe Art Of Debugging
The Art Of Debuggingsvilen.ivanov
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral ModelingAMITJain879
 
Software Project Management
Software Project ManagementSoftware Project Management
Software Project ManagementRamesh Babu
 
Design and Implementation in Software Engineering
Design and Implementation in Software EngineeringDesign and Implementation in Software Engineering
Design and Implementation in Software EngineeringKourosh Sajjadi
 
Ooad (object oriented analysis design)
Ooad (object oriented analysis design)Ooad (object oriented analysis design)
Ooad (object oriented analysis design)Gagandeep Nanda
 
formal verification
formal verificationformal verification
formal verificationToseef Aslam
 
Chapter 1 2 - some size factors
Chapter 1   2 - some size factorsChapter 1   2 - some size factors
Chapter 1 2 - some size factorsNancyBeaulah_R
 

Was ist angesagt? (20)

Dynamic and Static Modeling
Dynamic and Static ModelingDynamic and Static Modeling
Dynamic and Static Modeling
 
4.C#
4.C#4.C#
4.C#
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principles
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineering
 
software design principles
software design principlessoftware design principles
software design principles
 
SE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design PatternsSE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design Patterns
 
Software Engineering - chp3- design
Software Engineering - chp3- designSoftware Engineering - chp3- design
Software Engineering - chp3- design
 
Unit 2
Unit 2Unit 2
Unit 2
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
 
Software Cost Estimation Techniques
Software Cost Estimation TechniquesSoftware Cost Estimation Techniques
Software Cost Estimation Techniques
 
The Art Of Debugging
The Art Of DebuggingThe Art Of Debugging
The Art Of Debugging
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
 
Software Project Management
Software Project ManagementSoftware Project Management
Software Project Management
 
Behavioural modelling
Behavioural modellingBehavioural modelling
Behavioural modelling
 
Design and Implementation in Software Engineering
Design and Implementation in Software EngineeringDesign and Implementation in Software Engineering
Design and Implementation in Software Engineering
 
Ooad (object oriented analysis design)
Ooad (object oriented analysis design)Ooad (object oriented analysis design)
Ooad (object oriented analysis design)
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
formal verification
formal verificationformal verification
formal verification
 
Software process
Software processSoftware process
Software process
 
Chapter 1 2 - some size factors
Chapter 1   2 - some size factorsChapter 1   2 - some size factors
Chapter 1 2 - some size factors
 

Andere mochten auch

Ooad lab manual(original)
Ooad lab manual(original)Ooad lab manual(original)
Ooad lab manual(original)dipenpatelpatel
 
87683689 ooad-lab-record
87683689 ooad-lab-record87683689 ooad-lab-record
87683689 ooad-lab-recordPon Venkatesh
 
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org) (usef...
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org)  (usef...Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org)  (usef...
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org) (usef...Make Mannan
 
60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manualChitrarasan Kathiravan
 
Object Oriented Programming Lab Manual
Object Oriented Programming Lab Manual Object Oriented Programming Lab Manual
Object Oriented Programming Lab Manual Abdul Hannan
 
Computer lab rules and regulations
Computer lab rules and  regulationsComputer lab rules and  regulations
Computer lab rules and regulationsShanmugam Thiagoo
 
Lab manual of C++
Lab manual of C++Lab manual of C++
Lab manual of C++thesaqib
 
Mobile Computing I-Unit Notes
Mobile Computing I-Unit NotesMobile Computing I-Unit Notes
Mobile Computing I-Unit Notesgouse_1210
 
Welcome To Your Computer Lab Ppt
Welcome To Your Computer Lab PptWelcome To Your Computer Lab Ppt
Welcome To Your Computer Lab PptDot Rutherford
 
Computer Lab Management and Ethics in Using Computer
Computer Lab Management and Ethics in Using ComputerComputer Lab Management and Ethics in Using Computer
Computer Lab Management and Ethics in Using ComputerNur Azlina
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMoutaz Haddara
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignAnirban Majumdar
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Conceptsthinkphp
 

Andere mochten auch (14)

Ooad lab manual(original)
Ooad lab manual(original)Ooad lab manual(original)
Ooad lab manual(original)
 
Ooad lab manual
Ooad lab manualOoad lab manual
Ooad lab manual
 
87683689 ooad-lab-record
87683689 ooad-lab-record87683689 ooad-lab-record
87683689 ooad-lab-record
 
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org) (usef...
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org)  (usef...Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org)  (usef...
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org) (usef...
 
60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual
 
Object Oriented Programming Lab Manual
Object Oriented Programming Lab Manual Object Oriented Programming Lab Manual
Object Oriented Programming Lab Manual
 
Computer lab rules and regulations
Computer lab rules and  regulationsComputer lab rules and  regulations
Computer lab rules and regulations
 
Lab manual of C++
Lab manual of C++Lab manual of C++
Lab manual of C++
 
Mobile Computing I-Unit Notes
Mobile Computing I-Unit NotesMobile Computing I-Unit Notes
Mobile Computing I-Unit Notes
 
Welcome To Your Computer Lab Ppt
Welcome To Your Computer Lab PptWelcome To Your Computer Lab Ppt
Welcome To Your Computer Lab Ppt
 
Computer Lab Management and Ethics in Using Computer
Computer Lab Management and Ethics in Using ComputerComputer Lab Management and Ethics in Using Computer
Computer Lab Management and Ethics in Using Computer
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 

Ähnlich wie Ooad lab manual

Ähnlich wie Ooad lab manual (20)

432
432432
432
 
DISE - OOAD Using UML
DISE - OOAD Using UMLDISE - OOAD Using UML
DISE - OOAD Using UML
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
UNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxUNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptx
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
 
UML diagrams and symbols
UML diagrams and symbolsUML diagrams and symbols
UML diagrams and symbols
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software Engineering
 
Chapter-2 UML and UML Diagrams.pdf
Chapter-2 UML and UML Diagrams.pdfChapter-2 UML and UML Diagrams.pdf
Chapter-2 UML and UML Diagrams.pdf
 
Uml
UmlUml
Uml
 
Object Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLObject Oriented Analysis Design using UML
Object Oriented Analysis Design using UML
 
fdocuments.in_unit-2-ooad.ppt
fdocuments.in_unit-2-ooad.pptfdocuments.in_unit-2-ooad.ppt
fdocuments.in_unit-2-ooad.ppt
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
UML Modeling in Java
UML Modeling in JavaUML Modeling in Java
UML Modeling in Java
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
OOP_Module 2.pptx
OOP_Module 2.pptxOOP_Module 2.pptx
OOP_Module 2.pptx
 
UML.pdf
UML.pdfUML.pdf
UML.pdf
 
SMD Unit ii
SMD Unit iiSMD Unit ii
SMD Unit ii
 
Ch 2.1
Ch 2.1Ch 2.1
Ch 2.1
 

Kürzlich hochgeladen

How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesVijayaLaxmi84
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptxAneriPatwari
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxAnupam32727
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 

Kürzlich hochgeladen (20)

How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their uses
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 

Ooad lab manual

  • 1. Lab Manual OOAD OOAD LAB MANUAL Sukanya Roychowdhury Lecturer Pillai’s Institute Of Information Technology Sukanya Roychowdhury
  • 2. Lab Manual OOAD Introduction In late 1960‘s people were concentrating on Procedure Oriented Languages such as COBOL, FORTRAN, PASCAL…etc. Later on they preferred Object Oriented Languages. In the middle of 1970-80 three Scientists named as BOOCH, RUMBAUGH and JACOBSON found a new language named as Unified Modeling Language. It encompasses the Designing of the System/Program. It is a Defacto language. What is UML? • Is a language. It is not simply a notation for drawing diagrams, but a complete language for capturing knowledge (semantics) about a subject and expressing knowledge (syntax) regarding the subject for the purpose of communication. • Applies to modeling and systems. Modeling involves a focus on understanding a subject (system) and capturing and being able to communicate in this knowledge. • It is the result of unifying the information systems and technology industry‘s best engineering practices (principals, techniques, methods and tools). • used for both database and software modeling Overview of the UML • The UML is a language for – visualizing – specifying – constructing – documenting Sukanya Roychowdhury
  • 3. Lab Manual OOAD The artifacts of a software-intensive system Visual modeling (visualizing) • A picture is worth a thousand words! - Uses standard graphical notations - Semi-formal - Captures Business Process from enterprise information systems to distributed Web-based applications and even to hard real time embedded systems Specifying • building models that are: Precise, Unambiguous, Complete • UML symbols are based on well-defined syntax and semantics. • UML addresses the specification of all important analysis, design, and implementation decisions. Constructing • Models are related to OO programming languages. • Round-trip engineering requires tool and human intervention to avoid information loss – Forward engineering — direct mapping of a UML model into code. – Reverse engineering — reconstruction of a UML model from an implementation. Documenting – Architecture, Requirements, Tests, Activities (Project planning, Release management) Sukanya Roychowdhury
  • 4. Lab Manual OOAD Conceptual Model of the UML » To understand the UML, you need to form a conceptual model of the language, and this requires learning three major elements. Elements: 1. Basic building blocks 2. Rules 3. Common Mechanisms Basic Building Blocks of the UML The vocabulary of the UML encompasses three kinds of building blocks: » Things » Relationships » Diagrams 1.Structural Things • These are the Nouns and Static parts of the model. • These are representing conceptual or physical elements. There are seven kinds of structural things: 1. Class 2. Interface 3. Collaboration 4. Use Case 5. Active Class 6. Component 7. Node 1.Class Is a description of set of objects that share the same attributes, operations methods, relationships and semantics. Sukanya Roychowdhury
  • 5. Lab Manual OOAD Window Origin Size Open ( ) Close ( ) Move ( ) Name Attributes Operations A Simple Class Sukanya Roychowdhury
  • 6. 2.Interface A collection of operations that specify a service (for a resource or an action) of a class or component. It describes the externally visible behavior of that element Nam <<interface>> Iwindow Iname Operation Open () Close () A Simple Interface 3.Collaboration – Define an interaction among two or more classes. – Define a society of roles and other elements. – Provide cooperative behavior. – Capture structural and behavioral dimensions. – UML uses ‗pattern‖ as a synonym (careful) 4.Use Case Name Behavior – A sequence of actions that produce an observable result for a specific actor. – A set of scenarios tied together by a common user goal. – Provides a structure for behavioral things. – Realized through a collaboration (usually realized by a set of actors and the system to be built). Place order
  • 7. 5. Active Class – Special class whose objects own one or more processes or threads. – Can initiate control activity. Heavy border Event Manager Name Thread Attributes Operations Time Suspend () Flush () 6. Component • Replaceable part of a system. • Components can be packaged logically. • Conforms to a set of interfaces. • Provides the realization of an interface. • Represents a physical module of code 7. Node • Element that exists at run time. • Represents a computational resource. • Generally has memory and processing power. Orderform.java Web Server
  • 8. 1.Interaction • Is a behavior of a set of objects comprising of a set of messages exchanges within a particular context to accomplish a specific purpose. Display 2.State Machine • Is a behavior that specifies the sequences of states an object or an interaction goes through during its lifetime in response to events, together with its responses to those events. Idle Waiting 3.Grouping Things • These are the organizational parts of the UML models. ● There is only one primary kind of group thing: 1.Packages - General purpose mechanism for organizing elements into groups. - Purely conceptual; only exists at development time. - Contains behavioral and structural things. - Can be nested. - Variations of packages are: Frameworks, models, & subsystems.
  • 9. Business rules 4.Annotational Things • These are Explanatory parts of UML models • These are the Comments regarding other UML elements (usually called adornments in UML) There is only one primary kind of annotational thing: 1. Note A note is simply a symbol for rendering constraints and comments attached to an element or collection of elements. Is a best expressed in informal or formal text. Comments Relationships There are four kinds of relationships: 1. Dependency 2. Association 3. Generalization 4. Realization » These relationships tie things together. » It is a semantic connection among elements. » These relationships are the basic relational building blocks of the UML.
  • 10. 1. Dependency Is a semantic relationship between two things in which a change to one thing (the independent thing) may affect the semantics of the other thing (the dependent thing). 2.Association Is a structural relationship that describes a set of links, a link being a connection among objects. employer employee 0...1 * Aggregation » Is a special kind of association. It represents a structural relationship between the whole and its parts. » Represented by black diamond. 3.Generalization Is a specialization/generalization relationship in which objects of the specialized element (the child) are more specific than the objects of the generalized element.
  • 11. Diagrams • A diagram is the graphical presentation of a set of elements. • Represented by a connected graph: Vertices are things; Arcs are behaviors. UML includes nine diagrams: • Class Diagram; • Object Diagram • Use case Diagram • Sequence Diagram; • Collaboration Diagram • State chart Diagram • Activity Diagram • Component Diagram • Deployment Diagram Both Sequence and Collaboration diagrams are called Interaction Diagrams.
  • 12. Experiment No:1: Aim: To implement Inheritance Inheritance is the concept that when a class of object is defined, any subclass that is defined can inherit the definitions of one or more general classes. This means for the programmer that an object in a subclass need not carry its own definition of data and methods that are generic to the class (or classes) of which it is a part. This not only speeds up program development; it also ensures an inherent validity to the defined subclass object (what works and is consistent about the class will also work for the subclass). The simple example in C++ is having a class that inherits a data member from its parent class. class A { public: integer d; }; class B : public A { public: }; The class B in the example does not have any direct data member does it? Yes, it does. It inherits the data member d from class A. When one class inherits from another, it acquires all of its methods and data. We can then instantiate an object of class B and call into that data member. void func() { B b; b.d = 10; };
  • 13. Experiment No. 2: Aim : To Implement Polymorphism In object-oriented programming, polymorphism (from the Greek meaning "having multiple forms") is the characteristic of being able to assign a different meaning to a particular symbol or "operator" in different contexts. The simple example is two classes that inherit from a common parent and implement the same virtual method. class A { public: virtual void f()=0; }; class B { public: virtual void f() {std::cout << "Hello from B" << std::endl;}; }; class C { public: virtual void f() {std::cout << "Hello from C" << std::endl;}; }; If I have an object A, then calling the method f() will produce different results depending on the context, the real type of the object A. func(A & a) { A.f(); };
  • 14. Experiment No: 3 Aim: Class Diagram • Class Diagrams describe the static structure of a system, or how it is structured rather than how it behaves. • A class diagram shows the existence of classes and their relationships in the logical view of a system These diagrams contain the following elements. – Classes and their structure and behavior – Association, aggregation, dependency, and inheritance relationships – Multiplicity and navigation indicators – Role names These diagrams are the most common diagrams found in O-O modeling systems. Examples: Registration Student Experiment No: 4 Aim: Object Diagrams • Shows a set of objects and their relationships. • A static snapshot of instances. • Object Diagrams describe the static structure of a system at a particular time. Whereas a class model describes all possible situations, an object model describes a particular situation. Object diagrams contain the following elements: Objects which represent particular entities. These are instances of classes. Links which represent particular relationships between objects. These are instances of associations.
  • 15. Harry (Student) Name:” Harry Mat” Major: C.S Experiment No: 5 Aim: Use case diagrams Use Case Diagrams describe the functionality of a system and users of the system. These diagrams contain the following elements: Actors: which represent users of a system, including human users and other systems. Use Cases: which represent functionality or services provided by a system to users. Registrar Student Maintain
  • 16. Experiment No: 6 Aim: Sequence Diagrams ● Sequence Diagrams describe interactions among classes. These interactions are modeled as exchanges of messages. ● These diagrams focus on classes and the messages they exchange to accomplish Some desired behavior. ● Sequence diagrams are a type of interaction diagrams. Sequence diagrams contain the following elements: Class roles: which represent roles that objects may play within the interaction. Lifelines: which represent the existence of an object over a period of time. Activations: which represent the time during which an object is performing an operation. Messages: which represent communication between objects. Experiment No: 7 Aim: Collaboration Diagram Collaboration Diagrams describe interactions among classes and associations. These interactions are modeled as exchanges of messages between classes Through their associations. Collaboration diagrams are a type of interaction Diagram. Collaboration diagrams contain the following elements. Cass roles: which represent roles that objects may play within the interaction. Association roles: which represent roles that links may play within the interaction. Message flows: which represent messages sent between objects via links. Links transport or implement the delivery of the message.
  • 17. Experiment No: 8 Aim: Statechart Diagrams State chart (or state) diagrams describe the states and responses of a class. Statechart Diagrams describe the behavior of a class in response to external stimuli. These diagrams contain the following elements: States: which represent the situations during the life of an object in which it satisfies some condition, performs some activity, or waits for some occurrence. Transitions: which represent relationships between the different states of an object. Experiment No: 9 Aim: Activity Diagrams Activity diagrams describe the activities of a class. These diagrams are similar to Statechart diagrams and use similar conventions, but activity diagrams describe the behavior of a class in response to internal processing rather than external events as in Statechart diagram. Swimlanes: which represent responsibilities of one or more objects for actions within an overall activity; that is, they divide the activity states into groups and assign these groups to object that must perform the activities. Action States: which represent atomic, or noninterruptible, actions of entities or steps in the execution of an algorithm. Action flows: which represent relationships between the different action states of an entity. Object flows: which represent the utilization of objects by action states and the influence of action states on objects. Experiment No: 10 Aim: Component Diagram Component diagrams describe the organizations and dependencies among software Implementation components. These diagrams contain components, which represent Distributable physical units, including source code, object code, and executable code. These are static implementation view of a system. Experiment No: 11 Aim : Deployment Diagrams
  • 18. Deployment diagrams describe the configuration of run-time processing resource elements and the mapping of software implementation components onto them. These Diagrams contain components and nodes, which represent processing or computational resources, including computers, printers, etc.