CS504 Short Notes Mid Term
CS504 Short Notes Mid Term
CS504 Short Notes Mid Term
Lec 1 to22
BY vuonlinehelp.blogspot.com
YouTube link:
Website Link:
https://vuonlinehelp.blogspot.com/
Important Note
You should never copy paste the same answer which we are providing.
Please do make some changes in the solution file. If you appreciate our
work, please share our website vuonlinehelp.blogspot.com with your
friends.
Software is a set of instructions, data or programs used to operate computers and execute specific
tasks. It is the opposite of hardware, which describes the physical aspects of a computer.
Software is a generic term used to refer to applications, scripts and programs that run on a
device.
Program:
The program or code itself is definitely included in the software.
Data:
The data on which the program operates is also considered as part of the software.
Documentation:
Another very important thing that most of us forget is documentation. All the documents
related to the software are also considered as part of the software.
Software not only makes your computer hardware perform important tasks, but can also help
your business work more efficiently. The right software can even lead to new ways of working.
It is therefore a crucial business asset and you should choose your software carefully so that it
matches your business needs.
Technically speaking, a system is software that provides services to other software. The term
system is often used to denote the complexity of software that is commonly used by
organizations. Software is a generic term for any computer code.
Software crisis is a term used in the early days of computing science for the difficulty of writing
useful and efficient computer programs in the required time. The software crisis was due to the
rapid increases in computer power and the complexity of the problems that could now be tackled.
“All aspects of software production’ Software engineering is not just concerned with the
technical processes of software development but also with activities such as software project
management and with the development of tools, methods and theories to support software
production”.
Programming Language
Programming Language Design
Software Design Techniques
Tools
Testing
Maintenance
Development etc.
Well-Engineered Software
It is the flexibility of the software that ought to not cause any physical or economic injury within
the event of system failure. It includes a range of characteristics such as reliability, security, and
safety. In time: Software should be developed well in time the major challenges for a software
engineer is that he has to build software within limited time and budget in a cost-effective way
and with good quality.
Software Engineering is actually the balancing act. You have to balance many things like cost,
user friendliness, Efficiency, Reliability etc. You have to analyze which one is the more
important feature for your software is it reliability, efficiency, user friendliness or something
else.
Software Engineering is nothing but a disciplined and systematic approach to software development.
Software Development
Software development refers to a set of computer science activities dedicated to the process of
creating, designing, deploying and supporting software. Software itself is the set of instructions
or programs that tell a computer what to do. It is independent of hardware and makes computers
programmable.
Construction
The construction activities are those that directly related to the development of software. Some
of the major construction activities are listed below.
Requirement Gathering
Design Development
Coding
Testing
Management
Management activities are kind of umbrella activities that are used to smoothly and successfully
perform the construction activities. Some of the major management activities are listed below.
Among the most widely used frameworks that we employ in development are React, NodeJS,
Angular but there are many other as well. Frameworks like Django or Xamarin are used for more
nuanced aspects of development on certain projects that require special approach.
Software Development Loop
Software engineering activities from different perspective Software development activities could
be performed in a cyclic and that cycle is called software development loop.
Vision:
Here we determine why are we doing this thing and what are our business objectives that
we want to achieve.
Definition:
Here we actually realize or automate the vision developed in first phase. Here we
determine what are the activities and things involved.
Development:
Here we determine, what should be the design of the system, how will it be implemented
and how to test it.
Maintenance:
This is very important phase of software development. Here we control the change in
system, whether that change is in the form of enhancements or defect removal.
Importance of Requirements
“The hardest single part of building a software system is deciding precisely what to
build. No other part of the conceptual work is as difficult as establishing the
detailed technical requirements, including all the interfaces to people, to machines,
and to other software systems. No other part of the work so cripples the system if
done wrong. No other part is more difficult to rectify later.”
Different levels of software requirements are documented in different documents. The two main
documents produced during this phase are Requirement Statement and Requirement Specification.
They are also called Requirement Definition and Functional Specification and are used to document user
requirements and functional requirements respectively.
The following figure depicts the relationship between different documents produced during the
requirement engineering phase.
Business Requirements
The context diagram identifies the entities outside the system that interface to it in some way (called
terminators or external entities), as well as the flow of data and material between each external entity
and the system. The context diagram is used as the top level abstraction in a dataflow diagram
developed according to principles of structured analysis.
Use Case Model Components
A use case model has two components, use cases and actors.
Use case models, boundaries of the system are defined by functionality that is handled by the
system.
A use case model represents a use case view of the system.
The UML allows us to extend and reuse already defined use cases by defining the relationship among
them. The “extends” relationship is kind of a generalization specialization relationship.
The use case model, each use is elaborated by adding detail of interaction between the user and the
software system. An elaborated use case has the following components:
Activity Diagrams
Activity diagrams give a pictorial description of the use case. It is similar to a flow chart and shows a flow
from activity to activity. It expresses the dynamic aspect of the system. Following is the activity diagram
for the Delete Information use case.
Source
Sink
Sink is the consumer of certain information. It is that entity which provides a logical end to a business
process. ‘Sinks of requirements’ are a concept that helps in identifying persons, organizations or
external systems that gets certain functionality from the system.
Process Models
A software process model is an abstraction of the software development process. The models specify
the stages and order of a process. So, think of this as a representation of the order of activities of the
process and the sequence in which they are performed. A model will define the following: The tasks to
be performed.
System models are techniques used to understand user needs and software engineer use these
techniques in order to understand business domain. Software engineers develop diagrams to model
different business processes. System models include the following
The first model that we will look at is called the process model. This model provides a high-level pictorial
view of the business process. This model can be used as a starting point in giving the basic orientation to
the reader of the document.
State transition diagrams (STDs) are another technique to document domain knowledge. In many cases,
information flows from one place to the other and at each place certain action is taken on that piece of
information before it moves to the next place.
There are several notations of the data flow diagrams. In the following, four different are explained.
Process
What are different processes or work to be done in the system transforms of data is Transforms of data.
External Agent
External systems which are outside the boundary of this system. These are represented using the
squares External Agent
Data Store
Where data is being stored for later retrieval Provides input to the process Outputs of the processes
may be going into these data stores.
Data Flow
Where the data is flowing represents the movement of the data in a data flow diagram.
Typical processes which are typically modeled using data flow diagrams. These processes
transform data in one or the other way but these are found in almost all the automated systems.
CRUD Operations
Create:
creates data and stores it.
Read:
retrieves the stored data for viewing.
Update:
makes changes in an stored data.
Delete:
deletes an already stored data permanently
In the following data flow diagram, an accounting system has been described. Three processes
are given Generate an Employee Bank Statement; Create a New Member Account, and Freeze
Member Account.
A user interface sketch, or sketch, is a mock-up of a graphical user interface that you create while you
design an application. You create sketches by adding drawing elements to the sketching editor. You can
also add existing images, parts, and other sketches to a user interface sketch.
Prototype
Prototyping is yet another technique that can be used to reduce customer dissatisfaction at the
requirement stage. This is used when there is uncertainty regarding requirements.
Software design is the process by which an agent creates a specification of a software artifact
intended to accomplish goals, using a set of primitive components and subject to constraints.
A complex system that works is invariably found to have evolved from a simple system that
worked. Hierarchical structure and where intracomponent linkages are generally stronger than
inter component linkages. A complex system may be divided into smaller pieces of lesser
complexity called modules. This is the classic divide-and-conquer philosophy.
Software Design is the process to transform the user requirements into some suitable form,
which helps the programmer in software coding and implementation. During the software design
phase, the design document is produced, based on the customer requirements as documented in
the SRS document.
Software design process revolves around decomposing of the system into smaller and simpler
units and then systematically integrates these units to achieve the desired results. Two
fundamental strategies have been used to that end. These are functional or structured design and
object oriented design.
A software design can be looked at from different angles and different parameters can be used to
measure and analyze its quality. These parameters include efficiency, compactness, reusability,
and maintainability.
Maintainable Design
In general, maintenance contributes towards a major share of the overall software cost, the
objective of the design activity, in most cases, is to produce a system that is easy to maintain.
Coupling is a measure of independence of a module or component. Loose coupling means that different
system components have loose or less reliance upon each other. Coupling measures the
interdependence of two modules while cohesion measures the independence of a module. If modules
are more independent, they will be less dependent upon others.
Cohesion short
Strong cohesion implies that all parts of a component should have a close logical relationship with each
other. That means, in the case some kind of change is required in the software, all the related pieces are
found at one place.
Abstractions are a technique in which we construct a model of an entity based upon its essential
characteristics and ignore the inessential details. The principle of abstraction also helps us in handling
the inherent complexity of a system by allowing us to look at its important external characteristic, at the
same time, hiding its inner complexity. Hiding the internal details is called encapsulation.
Classification
The most important and critical stage in the OOA and OOD is the appropriate classification of objects
into groups and classes. Proper classification requires looking at the problem from different angles and
with an open mind.
The elements of object oriented design collectively are called the Object Model. The object model
encompasses the principles of abstraction, encapsulation, and hierarchy or inheritance. Abstraction is an
extremely powerful technique for dealing with complexity. An abstraction focuses on the outside view
of an object, and hence serves to separate an objects external behavior from its implementation.
The intent of OOA is to define all classes, their relationships, and their behavior. A number of tasks must
occur:
Static Model
Dynamic Model
Scenario Diagrams
OOD transforms the analysis model into design model that serves as a blueprint for software
construction. OOD results in a design that achieves a number of different levels of modularity. The four
layers of the OO design pyramid are:
We now analyze the identified nouns and try to establish whether they would be standalone classes in
our domain or not. Outcome of this analysis is shown below.
Register
Display
Keypad
Keys
Drawer
0-9 Key
Money
Subtotal Key
Tax Key
Total Key
We will continue with technique to identify all the constituent components of the model and derive our
object-oriented design.
The Notation
Many different notations are used for documenting the object oriented design. Most popular of these
include, Rumbaugh, Booch, and Coad, and UML(Unified Modeling Language). We will be using UML to
document our design. Although the notation is very comprehensive and detailed
Lecture No. 16 Derivation of the Object Model – The Coad Methodology
Skip
Generalization-Specialization (Gen-Spec)
whole-part
Identify Gen-Spec Structures (Hierarchy) Consider each class that you have identified as a specialization
and then look for its generalization and vice versa.
An attribute is defined as a quality or characteristic of a person, place, or thing. Real life individuals and
fictional characters possess various attributes. For example, someone might be labeled beautiful,
charming, funny, or intelligent.
Lecture No. 18 CASE STUDY: Connie’s Convenience Store - A point of Sale System
person
cashier
head cashier
customer
Customer
You must have a way to know about customer objects; otherwise it should not be put in
the domain model.
Select Places
store
shelf
Shelf
Select Transactions
sale
every sale is a collection of sale line items
return
payment
session
Lecture No. 20 Interaction Diagrams – depicting the dynamic behavior of the system
Interaction Diagrams
A series of diagrams can be used to describe the dynamic behavior of an object-oriented system. This is
done in terms of a set of messages exchanged among a set of objects within a context to accomplish a
purpose. This is often used to model the way a use case is realized through a sequence of messages
between objects.
UML
UML provides two different mechanisms to document the dynamic behaviour of the system. These are
sequence diagrams which provide a time-based view and Collaboration Diagrams which provide an
organization-based view of the system’s dynamics.
The focus of sequence diagrams is on objects (and classes) and message exchanges among them to carry
out the scenarios functionality. The objects are organized in a horizontal line and the events in a vertical
time line.
The boxes denote objects (or classes), the solid lines depict messages being sent from one object to the
other in the direction of the arrow, and the dotted lines are called life-lines of objects.
Types Sequence diagrams can depict many different types of messages. These are: synchronous
or simple, asynchronous, create, and destroy. The following diagram shows the notation and
types of arrows used for these different message types.
Synchronous Messages
Synchronous messages are “call events” and are denoted by the full arrow. They represent nested
flow of control which is typically implemented as an operation call.
Asynchronous messages
Asynchronous messages are “signals,” denoted by a half arrow. They do not block the caller.
That is, the caller does not wait for the called routine to finish its operation for continuing its
own sequence of activities. Asynchronous messages typically perform the following actions:
An object may create another object via a < create> message. Similarly an object may destroy
another object via a < destroy> message. An object may also destroy itself. One should avoid
modeling object destruction unless memory management is critical. The following diagrams show object
creation and destruction. It is important to note the impact of these activities on respective life lines.
It is important to judiciously use the sequence diagrams where they actually add value. The golden
principle is to keep it small and simple. It is important to understand that the diagrams are meant to
make things clear.
Collaboration diagrams
Collaboration diagrams can also be used to depict the dynamic behaviour of a system. Collaboration
diagrams have basically two types of components: objects and messages. Objects exchange messages
among each-other. Collaboration diagrams can also show synchronous, asynchronous, create, and
destroy message using the same notation as used in sequence diagrams. Messages are numbered and
can have loops.
Software
Dijkstra pointed out the elegant conceptual integrity exhibited by such an organization, with the
resulting gains in development and maintenance ease. All of the work in the field of software
architecture may be seen as evolving towards a paradigm of software development based on
principles of architecture, and for exactly the same reasons given by Dijkstra and Parnas:
Structure is important, and getting the structure right carries benefits.
Software architecture
Garlan and Perry, guest editorial to the IEEE Transactions on Software Engineering, April 1995:
Software architecture is "the structure of the components of a program/system, their
interrelationships, and principles and guidelines governing their design and evolution over time."
Architectural Attributes
Software architecture must address the non-functional as well as the functional requirements of
the software system. This includes performance, security, safety, availability, and
maintainability.