22cs602 Unit II
22cs602 Unit II
2
22CS602-OBJECT ORIENTED SOFTWARE ENGINEERING
DEPARTMENT : CSE/ADS/AIML/CSD
BATCH : 2021-2025
YEAR/SEMESTER :III/VI
CREATED BY
1. Contents 4
2. Course Objectives 5
3. Pre-Requisites 6
4. Syllabus 7
5. Course outcomes 8
10. Assignments 52
4
Course
Objectives
5
Pre-Requisites
Semester IV
22CS602 - OBJECT ORIENTED SOFTWARE ENGINEERING
Semester II
22CS201-DATA STRUCTURES
6
SYLLABUS
The Nature of Software – Defining the Discipline – The Software Process – Process models
– Prescriptive Process Models – Product and Process – Agility and Process – What is an
Agile Process?– Scrum– Other Agile Framework – Kanban – DevOps
Object oriented Analysis process – Business object Analysis – Use-case driven OOA –
Business process modelling – Use case model. Design Concepts -Design Process – Design
Concepts – Design Model: Design Principles and Design Elements. Architectural Design–
Designing class- based components - Conducting Component Level Design –-
User Interface Analysis and Design – Pattern-
Based Software Design
8
CO- PO/PSO
Mapping
Program
Program Outcomes Specific
Level Outcomes
Course
of
OutCome
CO K3,
s K3 K4 K4 K5 K5, A3 A2 A3 A3 A3 A3 A2 PS
K6 PS PS
O-
O-2 O-3
1
PO- PO- PO- PO- PO- PO- PO- PO- PO- PO- PO- PO-
1 2 3 4 5 6 7 8 9 10 11 12
2 1 1 - - - - - - - - - 2 2 -
CO1 K2
2 1 1 - - - - - - - - - 2 2 -
CO2 K2
3 2 2 - - - - - - - - 1 2 2 -
CO3 K2
3 2 2 - - - - - - - - 1 2 2 -
CO4 K3
3 2 2 - - - - - - - - 1 2 2 -
C05 K3
9
UNIT - II
10
Lecture Plan Unit -2
Sl. Topic Number Proposed Actual CO Taxonom Mode of
No of Date Lectur y Level Delivery
Periods e Date
.
1 Requirements 1 C02 K2 PPT,
Engineering Chalk
and Talk
`
ACTIVITY-Represent workflows in an graphical way.
CLASS-Main building block of any object oriented solution.
DEPLOYMENT-Shows the hardware of your system and the software in those
hardware
PACKAGE-Shows the dependencies between different packages in a system
OBJECT-Sometimes referred as Instance diagrams and very similar to class
diagrams.
STATEMACHINE-Describes the behavior of objects that act different
according to the state they are at the moment.
COMMUNICATION-Focuse on messages passed between objects
COMPONENT-Displays the structural relationship of components of a
software system
USECASE-Gives a graphic overview of the actors involved in a system,
different functions needed by those actors.
PROFILE-Which describes lightweight extension mechanism to the UML
TIMING-Represent the behavior of objects in a given time frame
SEQUENCE-Shows how object interact with each other and the order those
interactions occur
12
22CS602 OBJECT ORIENTED SOFTWARE ENGINEERING
UNIT II REQUIREMENTS AND UNIFIED MODELING
Requirements Engineering:
Designing and building computer software is challenging, creative, and just plain
fun. In fact, building software is so compelling that many software developers want to
jump right in before they have a clear understanding of what is needed. They argue that
things will become clear as they build, that project stakeholders will be able to understand
need only after examining early iterations of the soft- ware, that things change so rapidly
that any attempt to understand requirements in detail is a waste of time, that the bottom
line is producing a working program, and that all else is secondary. What makes these
arguments seductive is that they contain elements of truth.' But each argument is flawed
and can lead to a failed software project.
The broad spectrum of tasks and techniques that lead to an understanding of
requirements is called requirements engineering. From a software process per- spective,
requirements engineering is a major software engineering action that begins during the
communication activity and continues into the modeling activity. It must be adapted to
the needs of the process, the project, the product, and the people doing the work.
Requirements engineering encompasses seven distinct tasks: inception, elicitation,
elaboration, negotiation, specification, validation, and management. It is important to
note that some of these tasks occur in parallel and all are adapted to the needs of the
project
13
Inception.
How does a software project get started? Is there a single event that becomes
the catalyst for a new computer-based system or product, or does the need evolve
over time? There are no definitive answers to these questions. In some cases, a
casual conversation is all that is needed to precipitate a major software engineering
effort. But in general, most projects begin when a business need is identified or a
potential new market or service is discovered. Stakeholders from the business
community (e.g., business managers, marketing people, product managers) define a
business case for the idea, try to identify the breadth and depth of the market, do a
rough feasibility analysis, and identify a working description of the project's scope. All
of this information is subject to change, but it is sufficient to precipitate discussions
with the software engineering organization. At project inception, you establish a basic
understanding of the problem,
the people who want a solution, the nature of the solution that is desired, and
the effectiveness of preliminary communication and collaboration between the other
stakeholders and the software team.
Elicitation.
It certainly seems simple enough—ask the customer, the users, and others
what the objectives for the system or product are, what is to be accomplished, how
the system or product fits into the needs of the business, and finally, how the system
or product is to be used on a day-to-day basis. But it isn't simple— it's very hard.
An important part of elicitation is to establish business goals. Your job is to
engage stakeholders and to encourage them to share their goals honestly. Once the
goals have been captured, a prioritization mechanism should be established, and a
design rationale for a potential architecture (that meets stake- holder goals) can be
created.
Christel and Kang identify a number of problems that are encountered as
elicitation occurs.
Problems of scope
It occur when the boundary of the system is ill-defined or the customers
and users specify unnecessary technical detail that understanding may confuse,
rather than clarify, overall system objectives.
Problems of understanding
These are encountered when customers and users are not completely sure
what is needed, have a poor understanding of the capabilities and limitations of
their computing environment, don't have a full understanding of the problem
domain, have trouble communicating needs, omit information that is believed to be
“obvious,” specify requirements that conflict with the needs of other customers and
users, or specify requirements that are ambiguous or untestable.
Problems of volatility
It occur when the requirements change over time.
To help overcome those problems, you must approach the requirements-gathering
activity in an organized manner.
Elaboration.
The information obtained from the customer during inception and elicitation
is expanded and refined during elaboration. This task focuses on developing a
refined requirements model that identifies various aspects of software function,
behavior, and information.
Elaboration is driven by the creation and refinement of user scenarios that
describe how the end user will interact with the system. Each user scenario is
parsed to extract analysis classes—business domain entities that are visible to the
end user. The attributes of each analysis class are defined, and the services' that
are required by each class are identified. The relationships and collaboration
between classes are identified, and a variety of supplementary diagrams are
produced.
Negotiation.
It isn't unusual for customers and users to ask for more than can be
achieved, given limited business resources. It's also relatively common for different
customers or users to propose conflicting requirements, arguing that their version is
“essential for our special needs.”
Specification.
In the context of computer-based systems (and software), the term
specification means different things to different people. A specification can be a
written document, a set of graphical models, a formal mathematical model, a
collection of usage scenarios, a prototype, or any combination of these.
Some suggest that a “standard template” should be developed and used for
a specification, arguing that this leads to requirements that are presented in a
consistent and therefore more understandable manner. However, it is sometimes
necessary to remain flexible when a specification is to be developed. For large
systems, a written document, combining natural language descriptions and
graphical models may be the best approach. However, usage scenarios may be all
that are required for smaller products or systems that reside within well-understood
technical environments.
Validation.
If five stakeholders are involved in a software project, you may have five (or
more) different opinions about the proper set of requirements. Throughout earlier
chapters, we have noted that customers (and other stakeholders) should collaborate
among themselves (avoiding petty turf battles and with software engineering
practitioners if a successful system is to result. But how is this collaboration
accomplished?
The job of a requirements engineer is to identify areas of commonality (i.e.,
requirements on which all stakeholders agreed and areas of conflict or inconsistency
(i.e., requirements that are desired by one stakeholder but conflict with the needs of
another stakeholder). It is, of course, the latter category that presents a
challenge.
Collaboration does not necessarily mean that requirements are defined by
committee. In many cases, stakeholders collaborate by providing their view of
requirements, but a strong “project champion” e.g., a business manager or a senior
technologist) may make the final decision about which requirements make the cut.
Asking the First Questions
Questions asked at the inception of the project should be “context free” The
first set of context-free questions focuses on the customer and other stake-holders,
the overall project goals and benefits. For example, you might ask:
The answers to these and other questions will evolve over time.
Developing Use Cases
Alistair Cockburn notes that “a use case captures a contract ... [thatl describes the
system's behavior under various conditions as the system responds to a request from one
of its stakeholders ...” In essence, a use case tells a stylized story about how an end user
(playing one of a number of possible roles interacts with the system under a specific set
of circumstances. The story may be narrative text, an outline of tasks or interactions, a
template-based description, or a diagrammatic representation. Regardless of its form, a
use case depicts the software or system from the end user's point of view.
The first step in writing a use case is to define the set of “actors” that will be
involved in the story. Actors are the different people (or devices) that use the system or
product within the context of the function and behavior that is to be described. Actors
represent the roles that people (or devices play as the system operates. Defined
somewhat more formally, an actor is anything that communi- cates with the system or
product and that is external to the system itself. Every actor has one or more goals when
using the system.
It is important to note that an actor and an end user are not necessarily the same
thing. A typical user may play a number of different roles when using a system, whereas
an actor represents a class of external entities (often, but not always, people that play
just one role in the context of the use case. As an ex- ample, consider a machine
operator (a user) who interacts with the control com- puter for a manufacturing cell that
contains a number of robots and numerically controlled machines. After careful review of
requirements, the software for the control computer requires four different modes (roles)
for interaction: program- ming mode, test mode, monitoring mode, and troubleshooting
mode. Therefore, four actors can be defined: programmer, tester, monitor, and
troubleshooter. In some cases, the machine operator can play all of these roles. In
others, different people may play the role of each actor.
Because requirements elicitation is an evolutionary activity, not all actors
are identified during the first iteration. It is possible to identify primary actors
during the first iteration and secondary actors as more is learned about the
system. Primary actors interact to achieve required system function and do- rive
the intended benefit from the system. They work directly and frequently with the
software. Secondary actors support the system so that primary actors can do their
work.
Once actors have been identified, use cases can be developed. Jacobson
suggests a number of questions" that should be answered by a use case:
In many instances, uses cases are further elaborated to provide considerably more
detail about the interaction. For example, Cockburn suggests following template for
detailed descriptions of use cases:
Scenario.
Homeowner: observes control panel
Homeowner: enters password
Exceptions:
1. Control panel is not ready: homeowner checks all sensors to determine which are
open; closes them.
Negotiating Requirements
In an ideal requirements engineering context, the inception, elicitation, and
elaboration tasks determine customer requirements in sufficient detail to proceed to
subsequent software engineering activities. Unfortunately, this rarely happens.
In reality, you may have to enter into a negotiation with one or more
stakeholders. In most cases, stakeholders are asked to balance functionality,
performance,and other product or system characteristics against cost and time-to-
market.The intent of this negotiation is to develop a project plan that meets
stakeholder needs while at the same time reflecting the real-world constraints (e.g.,
time, people, budget) that have been placed on the software team.
The best negotiations strive for a “win-win” result' That is, stakeholders win by
getting the system or product that satisfies the majority of their needs and you(as a
member of the software team) win by working to realistic and achievable
budgets and deadlines.
UML Diagrams
UML is composed of 9 graphical diagrams:
actors, their goals represented as use cases, and any dependencies among those
use cases.
2.Behaviour Diagram
a. Interaction Diagram
1. Sequence Diagram-shows how objects communicate with each other in terms
of a sequence of messages .Also indicates the lifespan of objects relative to those
messages.
2. Communication diagram: how the interactions between objects or parts in
terms of sequenced messages
a. State Chart Diagram –describes the states and state transitions of the
system.
The same UML class diagram notation can be used to draw pictures of
concepts in the real world or software classes in Java.
that exist in the problem domain. These are expressed using class, object or
component. While dynamic modeling refers to representing the object interactions
states of objects. This view includes sequence diagrams, activity diagrams, and
diagram map:
Behavioral Diagrams
UML’s five behavioral diagrams are used to visualize, specify, construct, and document
the dynamic aspects of a system. It shows how the system behaves and interacts with
itself and other entities (users, other systems). They show how data moves through
the system, how objects communicate with each other, how the passage of time
affects the system, or what events cause the system to change internal states. Since
behavior diagrams illustrate the behavior of a system, they are used extensively to
describe the functionality of software systems. As an example, the activity diagram
describes the business and operational step-by-step activities of the components in a
system.
In other words, a behavioral diagram shows how the system works ‘in motion’, that is
how the system interacts with external entities and users, how it responds to input or
event and what constraints it operates under. There are seven behavioral diagrams
that you can model the dynamics of a system as listed in the Table below:
State Machine Diagram It shows the discrete behavior of a part of a designed system
through finite state transitions.
Interaction Overview It depicts a control flow with nodes that can contain other
Diagram interaction diagrams.
Timing Diagram It shows interactions when the primary purpose of the diagram
is to reason about time by focusing on conditions changing
within and among lifelines along a linear time axis.
Structural Diagrams
Structure diagrams depict the static structure of the elements in your system. i.e., how
one object relates to another. It shows the things in the system – classes, objects,
packages or modules, physical nodes, components, and interfaces. For example, just as
the static aspects of a house encompass the existence and placement of such things as
walls, doors, windows, pipes, wires, and vents. The Seven UML structural diagrams are
roughly organized around the major groups of things you’ll find when modeling a
system.
Since structure diagrams represent the structure, they are used extensively in
documenting the software architecture of software systems.
For example, the component diagram describes how a software system is split up into
components and shows the dependencies among these components.
Deployment Diagram It shows a set of nodes and their relationships that illustrates
the static deployment view of an architecture.
Profile Diagram
Class Diagram It shows a set of classes, interfaces, and collaborations and their
relationships, typically, found in modeling object-oriented
systems.
Object Diagram It shows a set of objects and their relationships, which is the
static snapshots of instances of the things found in class
diagrams.
● Upper Section: The upper section encompasses the name of the class. A class
is a representation of similar objects that shares the same relationships,
attributes, operations, and semantics. Some of the following rules that should
be taken into account while representing a class are given below:
a. The attributes are written along with its visibility factors, which are public
(+), private (-), protected (#), and package (~).
b. The accessibility of an attribute class is illustrated by the visibility factors.
c. A meaningful name should be assigned to the attribute, which will
explain its usage inside the class.
● Lower Section: The lower section contain methods or operations. The
methods are represented in the form of a list, where each method is written in
a single line. It demonstrates how a class interacts with data.
Relationships
In UML, relationships are of three types:
The company encompasses a number of employees, and even if one employee resigns,
the company still exists.
A contact book consists of multiple contacts, and if you delete the contact book, all the
contacts will be lost.
How to draw a Class Diagram?
The class diagram is used most widely to construct software applications. It not only
represents a static view of the system but also all the major aspects of an application. A
collection of class diagrams as a whole represents a system.
Some key points that are needed to keep in mind while drawing a class diagram are
given below:
6. The diagrams should be redrawn and reworked as many times to make it correct
before producing its final version.
USE CASES
Introduction : Use cases are text stories, widely used to discover and record
requirements. use cases are text stories of some actor using a system to meet goals.
There are 3 formats to represent the use case
I) Brief Format II) Casual Format III) Fully Dressed Format
Definition: What are Actors, Scenarios, and Use Cases
An actor is something with behavior, such as a person (identified by role),
computer system, or organization; for example, a cashier.
A use case is a collection of related success and failure scenarios that describe
an actor using a system to support a goal.
Use Cases and the Use-Case Model
∙ Use cases are text documents, not diagrams, and use-case modeling is primarily an
act of writing text, not drawing diagrams.
∙ There are also the Supplementary Specification, Glossary, Vision, and Business Rules.
These are all useful for requirements analysis.
∙ The Use-Case Model may optionally include a UML use case diagram to show the
names of use cases and actors, and their relationships. This gives a nice context
diagram of a system and its environment. It also provides a quick way to list the use
cases by name.
Motivation: Why Use Cases?
● Lack of user involvement in software projects is near the top of the list of reasons
for project failure. Use cases are a good way to help keep it simple, and make it
possible for domain experts or requirement donors to themselves write use cases.
● Another value of use cases is that they emphasize the user goals and
perspective; we ask the question "Who is using the system, what are their typical
scenarios of use, and what are their goals?" This is a more user-centric emphasis
compared to simply asking for a list of system features.
Definition: Are Use Cases Functional Requirements
Use cases are requirements, primarily functional or behavioral requirements that
indicate what the system will do. A related viewpoint is that a use case defines a contract
of how a system will behave
∙ Primary actor has user goals fulfilled through using services of the SuD. For
example, the cashier.
Why identify? To find user goals, which drive the use cases.
∙ Supporting actor provides a service (for example, information) to the SuD. The
automated payment authorization service is an example. Often a computer system,
but could be an organization or person.
Why identify? To ensure that all necessary interests are identified and satisfied.
Offstage actor interests are sometimes subtle or easy to miss unless these actors
are explicitly named.
∙ Brief - Terse one-paragraph summary, usually of the main success scenario. The prior
Process Sale example was brief. It was created during early requirements analysis, to
get a quick sense of subject and scope. May take only a few minutes to create.
Guideline
∙ It makes a good context diagram that is, showing the boundary of a system,
what lies outside of it, and how it gets used.
∙ Guideline: Diagramming
Notice the actor box with the symbol «actor». This style is used for UML
keywords and stereotypes, and includes guillemet symbols special single-
character brackets («actor», not <<actor>>)
Alternate actor notation.
Kinds of relationships
The dynamic model is used to express and model the behaviour of the system over time.
It includes support for activity diagrams, state diagrams, sequence diagrams and
extensions including business process modelling.
Sequence Diagrams
Sequence diagrams are used to display the interaction between users, screens, objects
and entities within the system. It provides a sequential map of message passing
between objects over time. Frequently these diagrams are placed under Use Cases in
the model to illustrate the use case scenario - how a user will interact with the system
and what happens internally to get the work done. Often, the objects are represented
using special stereotyped icons, as in the example below. The object labelled Login
Screen is shown using the User Interface icon. The object labelled SecurityManager is
shown using the Controller icon. The Object labelled users is shown using the Entity
icon.
Activity Diagrams
Activity diagrams are used to show how different workflows in the system are
constructed, how they start and the possibly many decision paths that can be taken
from start to finish. They may also illustrate the where parallel processing may occur in
the execution of some activities.
State Charts
State charts are used to detail the transitions or changes of state an object can go
through in the system. They show how an object moves from one state to another and
the rules that govern that change. State charts typically have a start and end condition.
Process Model
Category 1:
1. You have been given the responsibility to elicit requirements
from a customer who tells you he is too busy to meet with you. What should
you do?
Category 2: Develop a complete use case for one of the following activities:
a. Making a withdrawal at an ATM
b. Using your charge card for a meal at a restaurant
c. Searching for books (on a specific topic) using an online
bookstore
Category 3:
Consider the use case Searching for books (on a specific topic)
using an online book store , and write a nonfunctional requirement for the
application
Category 4:
suggest one or more analysis patterns for the following
application domains:
a. E-mail software.
b. Internet browsers.
c. Mobile app creation software
Category 5:
Case study:
1. ATM application
2. Quiz application
52
11. Part A Q & A (with K level and CO)
S.No Questions
K Level CO Level
11 K2 C02
Define Use Cases
It is a Scenarios that describe how the product will be used
in specific situations
Use-cases designed from the actor’s point of view.
12 What is Activity Diagram? K2 C02
Activity diagram is basically a flowchart to represent the flow
from one activity to another activity.
Activity diagram is used to describe the dynamic aspects of the
system.
13 What are the three ways and perspectives to apply UML K2 C02
Three ways to apply UML
UML as sketch UML as
blueprint
UML as programming language
Three perspectives to apply UML
Conceptual perspective Specification
perspective Implementation perspective
14
K2 C02
Define Sequence Diagram.
A Sequence diagram simply depicts interaction between
objects in a sequential order i.e the order in which these
interactions take place.
http://nptel.ac.in
https://www.tutorialspoint.com/software_engineering/
www.udemy.com
www.upgrad.com
www.simplilearn.com
57
Real time Applications in day to day life and to Industry
58
ASSESSMENT
SCHEDULE
59
PRESCRIBED TEXTBOOKS & REFERENCE
BOOKS
TEXT BOOKS:
1. Roger S. Pressman, “Software Engineering: A Practitioner‘s Approach” , McGraw Hill
International Edition, Nineth Edition, 2020.
2. Ali Bahrami, “Object Oriented Systems Development”, McGraw Hill International
Edition,2017.
REFERENCES:
1. Micheal Blalh and James Rumbaugh, Object Oriented Modeling and Design with UML,
2nd edition Pearson 2013.
2. Ian Sommerville, “Software Engineering”, Tenth Edition, Pearson Education, 2016.
3. Ivar Jacobson, Harold Bud Lawson, Pan-Wei Ng, Paul E. McMahon, Michael Goedicke,
“The Essentials of Modern Software Engineering”, Morgan & Claypool Publishers, 2019.
4. Booch, G, Jacobson I, Rumbaugh J, “The Unified Modeling Language User Guide”,
Addison Wesley, 2008.
5. Martin Fowler, “UML Distilled: A Brief Guide to the Standard Object Modeling
6. Language”, 3rd edition, Addison Wesley, 2003.
60
Mini Project suggestions
61
Thank you
Disclaimer:
This document is confidential and intended solely for the educational purpose of RMK Group of Educational
Institutions. If you have received this document through email in error, please notify the system manager. This
document contains proprietary information and is intended only to the respective group / learning community as
intended. If you are not the addressee you should not disseminate, distribute or copy through e-mail. Please notify
the sender immediately by e-mail if you have received this document by mistake and delete this document from
your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any
action in reliance on the contents of this information is strictly prohibited.
62