Uploaded by EZIO AUDITORE

Software Engineering

advertisement
Practical No 1
Aim: Introduction to software engineering fundamentals, UML and Rational Rose Interface
or Star UML(Open source).
Theory:
Software:
Software is a computer code that tells a computer how to perform a specific task.
There are many kinds of software, including operating systems, applications and malware.
Software can be distributed for free, as shareware, commercially, or with its source
code(which is called open source).
Software is a set of instructions, written in computer code, that tells a computer how to
behave or how to perform a specific task. Software usually comes in the form of
commercial programs (like Microsoft Word and Adobe Photoshop), games, a
computer operating system, or even malware like viruses and ransomware. Any program
or code that runs on a computer is an example of software, and anything you do with a
computer requires the use of software. Software is created by computer programmers,
commonly referred to as coders.
The following are the characteristics of software:
1.
2.
3.
4.
5.
6.
7.
8.
Software does not wear out
Software is not manufacture
Usability of Software
Reusability of components
Flexibility of software
Maintainability of software
Portability of software
Reliability of Software
Now let us elaborate each of them...
1. Software does not wear out:
Different things like clothes, shoes, ornaments do wear out after some time. But,
software once created never wears out. It can be used for as long as needed and in case
of need for any updating, required changes can be made in the same software and then
it can be used further with updated features.
2. Software is not manufactured:
Software is not manufactured but is developed. So, it does not require any raw material
for its development.
3. Usability of Software:
The usability of the software is the simplicity of the software in terms of the user. The
easier the software is to use for the user, the more is the usability of the software as
more number of people will now be able to use it and also due to the ease will use it
more willingly.
4. Reusability of components:
As the software never wears out, neither do its components, i.e. code segments. So, if
any particular segment of code is required in some other software, we can reuse the
existing code form the software in which it is already present. This reduced our work
and also saves time and money.
5. Flexibility of software:
A software is flexible. What this means is that we can make necessary changes in our
software in the future according to the need of that time and then can use the same
software then also.
6. Maintainability of software:
Every software is maintainable. This means that if any errors or bugs appear in the
software, then they can be fixed.
7. Portability of software:
Portability of the software means that we can transfer our software from one platform
to another that too with ease. Due to this, the sharing of the software among the
developers and other members can be done flexibly.
8. Reliability of Software:
This is the ability of the software to provide the desired functionalities under every
condition. This means that our software should work properly in each condition.
Software Engineering:
Software Engineering is an engineering branch related to the evolution of software product
using well-defined scientific principles, techniques, and procedures. The result of software
engineering is an effective and reliable software product.
Engineering is the application of scientific and practical knowledge to invent, design, build,
maintain, and improve frameworks, processes, etc.
The importance of Software engineering is as follows:
1. Reduces complexity: Big software is always complicated and challenging to progress.
Software engineering has a great solution to reduce the complication of any project.
Software engineering divides big problems into various small issues. And then start
solving each small issue one by one. All these small problems are solved independently
to each other.
2. To minimize software cost: Software needs a lot of hardwork and software engineers
are highly paid experts. A lot of manpower is required to develop software with a large
number of codes. But in software engineering, programmers project everything and
decrease all those things that are not needed. In turn, the cost for software productions
becomes less as compared to any software that does not use software engineering
method.
3. To decrease time: Anything that is not made according to the project always wastes
time. And if you are making great software, then you may need to run many codes to
get the definitive running code. This is a very time-consuming procedure, and if it is
not well handled, then this can take a lot of time. So if you are making your software
according to the software engineering method, then it will decrease a lot of time.
4. Handling big projects: Big projects are not done in a couple of days, and they need
lots of patience, planning, and management. And to invest six and seven months of any
company, it requires heaps of planning, direction, testing, and maintenance. No one can
say that he has given four months of a company to the task, and the project is still in its
first stage. Because the company has provided many resources to the plan and it should
be completed. So to handle a big project without any problem, the company has to go
for a software engineering method.
5. Reliable software: Software should be secure, means if you have delivered the
software, then it should work for at least its given time or subscription. And if any bugs
come in the software, the company is responsible for solving all these bugs. Because in
software engineering, testing and maintenance are given, so there is no worry of its
reliability.
6. Effectiveness: Effectiveness comes if anything has made according to the standards.
Software standards are the big target of companies to make it more effective. So
Software becomes more effective in the act with the help of software engineering.
Software Engineering: A layered Technology
Software engineering is the establishment and use of sound engineering principles in order to
obtain economically software that is reliable and works efficiently in real machines.
(Figure: Software Engineering Layers)
A quality Focus:



Main principle of Software Engineering is Quality Focus.
An engineering approach must have a focus on quality.
Total Quality Management (TQM), Six Sigma, ISO 9001, ISO 9000-3, CAPABILITY
MATURITY MODEL (CMM), CMMI & similar approaches encourages a continuous
process improvement culture
Process:



It is a foundation of Software Engineering
It is the glue the holds the technology layers
It defines a framework with activities for effective delivery of software engineering
technology
Methods:


It provides technical how-to’s for building software
It encompasses many tasks including communication, requirement analysis, design
modeling, program construction, testing and support
Tools:



Software Engineering Tools allows automation of activities which helps to perform
systematic activities. A system for the support of software development, called
computer-aided software engineering (CASE). Examples: Testing Tools, Bug/Issue
Tracking Tools etc…
Computer-aided software engineering (CASE) is the scientific application of a set of
tools and methods to a software system which is meant to result in high-quality, defectfree, and maintainable software products
CASE tools automate many of the activities involved in various life cycle phases.
Systems of Graphical Notation
One important consideration in visual modelling is what graphical notation to use to represent
various aspects of a system. Many people have proposed notations for visual modelling. Some
of the popular notations that have strong support are Booch, Object Modelling Technology
(OMT), and UML. Rational Rose supports these three notations; however, UML is a standard
that has been adopted by the majority of the industry as well as the standards' governing boards
such as ANSI and the Object Management Group (OMG).
Booch Method
In software engineering the Booch method, that is published in 1991 by Grady Booch, is a
widely used method in object-oriented analysis and design. The Booch method has been
superseded by UML, which features elements from the Booch method with OMT and OOSE.
The Booch method helps to design systems using the object paradigm. It covers the analysisand design phases of an object-oriented system. The method defines different models to
describe a system and it supports the iterative and incremental development of systems. The
Booch method includes six types of diagrams such as class diagrams, object diagrams, state
transition diagrams, module diagrams, process diagrams and interaction diagrams.
The Booch method notation
Figure 1:Class Diagram Notation
Figure 2:A Object diagram Notation
Figure 3:An interaction diagram
Object Management Technology (OMT):
The OMT notation comes from Dr. James Rumbaugh, who has written several books
about systems analysis and design. In an aptly titled book, Object−Oriented Modeling and
Design (Prentice Hall, 1990), Rumbaugh discusses the importance of modeling systems in
real−world components called objects. OMT uses simpler graphics than Booch to illustrate
systems. A sampling of the objects and relationships represented in the OMT notation follows
in Figure 1.1.
Fig 1.1 Examples of symbol in OMT Notation
Unified Modelling Language (UML) :
UML notation comes from a collaborative effort of Grady Booch, Dr. James Rumbaugh, Ivar
Jacobson, Rebecca Wirfs−Brock, Peter Yourdon, and many others. Jacobson is a scholar who
has written about capturing system requirements in packages of transactions called use cases.
We will discuss use cases in detail in Chapter 4. Jacobson also developed a method for system
design called Object−Oriented SoftwareEngineering (OOSE) that focused on analysis. Booch,
Rumbaugh, and Jacobson, commonly referred to as the "three amigos," all work at Rational
Software Corporation and focus on the standardization and refinement of UML. UML symbols
closely match those of the Booch and OMT notations, and also include elements from other
notations. Figure 1.3.Shows a sample of UML notation.
Each of the three amigos of UML began to incorporate ideas from the other methodologies.
Official unification of the methodologies continued until late 1995, when version 0.8 of the
Unified Method was introduced. The Unified Method was refined and changed to the Unified
Modeling Language in 1996. UML 1.0 was ratified and given to the Object Technology Group
in 1997, and many major software development companies began adopting it. In 1997, OMG
released UML 1.1 as an industry standard.Over the past years, UML has evolved to incorporate
new ideas such as web−based systems and datamodeling. The latest release is UML 1.3, which
was ratified in 2000. The specification for UML 1.3 can be found at the Object Management
Group's website, http://www.omg.org/.
Fig 1.3 UML Basic Notations
Types of UML Diagrams:
We prepare UML diagrams to understand the system in a better and simple way. A single
diagram is not enough to cover all the aspects of the system. UML defines various kinds of
diagrams to cover most of the aspects of a system.
You can also create your own set of diagrams to meet your requirements. Diagrams are
generally made in an incremental and iterative way.
There are two broad categories of diagrams and they are again divided into subcategories −

Structural Diagrams

Behavioral Diagrams
a)Structural Diagrams
The structural diagrams represent the static aspect of the system. These static aspects represent
those parts of a diagram, which forms the main structure and are therefore stable.
These static parts are represented by classes, interfaces, objects, components, and nodes. The
four structural diagrams are −

Class diagram
 Object diagram
 Component diagram
 Deployment diagram
1.Class Diagram
Class diagrams are the most common diagrams used in UML. Class diagram consists of
classes, interfaces, associations, and collaboration. Class diagrams basically represent the
object-oriented view of a system, which is static in nature.
Active class is used in a class diagram to represent the concurrency of the system.
Class diagram represents the object orientation of a system. Hence, it is generally used for
development purpose. This is the most widely used diagram at the time of system construction.
2.Object Diagram
Object diagrams can be described as an instance of class diagram. Thus, these diagrams are
more close to real-life scenarios where we implement a system.
Object diagrams are a set of objects and their relationship is just like class diagrams. They
also represent the static view of the system.
The usage of object diagrams is similar to class diagrams but they are used to build prototype
of a system from a practical perspective.
3.Component Diagram
Component diagrams represent a set of components and their relationships. These components
consist of classes, interfaces, or collaborations. Component diagrams represent the
implementation view of a system.
During the design phase, software artifacts (classes, interfaces, etc.) of a system are arranged
in different groups depending upon their relationship. Now, these groups are known as
components.
Finally, it can be said component diagrams are used to visualize the implementation.
4.Deployment Diagram
Deployment diagrams are a set of nodes and their relationships. These nodes are physical
entities where the components are deployed.
Deployment diagrams are used for visualizing the deployment view of a system. This is
generally used by the deployment team.
Behavioural Diagrams
Any system can have two aspects, static and dynamic. So, a model is considered as complete
when both the aspects are fully covered.
Behavioural diagrams basically capture the dynamic aspect of a system. Dynamic aspect can
be further described as the changing/moving parts of a system.
UML has the following five types of behavioural diagrams −

Use case diagram
 Sequence diagram
 Collaboration diagram
 Statechart diagram
 Activity diagram
1.Use Case Diagram
Use case diagrams are a set of use cases, actors, and their relationships. They represent the
use case view of a system.
A use case represents a particular functionality of a system. Hence, use case diagram is used
to describe the relationships among the functionalities and their internal/external controllers.
These controllers are known as actors.
2.Sequence Diagram
A sequence diagram is an interaction diagram. From the name, it is clear that the diagram
deals with some sequences, which are the sequence of messages flowing from one object to
another.
Interaction among the components of a system is very important from implementation and
execution perspective. Sequence diagram is used to visualize the sequence of calls in a system
to perform a specific functionality.
3.Collaboration Diagram
Collaboration diagram is another form of interaction diagram. It represents the structural
organization of a system and the messages sent/received. Structural organization consists of
objects and links.
The purpose of collaboration diagram is similar to sequence diagram. However, the specific
purpose of collaboration diagram is to visualize the organization of objects and their
interaction.
4.Statechart Diagram
Any real-time system is expected to be reacted by some kind of internal/external events. These
events are responsible for state change of the system.
Statechart diagram is used to represent the event driven state change of a system. It basically
describes the state change of a class, interface, etc.
State chart diagram is used to visualize the reaction of a system by internal/external factors.
5.Activity Diagram
Activity diagram describes the flow of control in a system. It consists of activities and links.
The flow can be sequential, concurrent, or branched.
Activities are nothing but the functions of a system. Numbers of activity diagrams are prepared
to capture the entire flow in a system.
Activity diagrams are used to visualize the flow of controls in a system. This is prepared to
have an idea of how the system will work when executed.
Architecture View Model
A model is a complete, basic, and simplified description of software architecture which is
composed of multiple views from a particular perspective or viewpoint.
A view is a representation of an entire system from the perspective of a related set of concerns.
It is used to describe the system from the viewpoint of different stakeholders such as endusers, developers, project managers, and testers.
4+1 View Model
The 4+1 View Model was designed by Philippe Kruchten to describe the architecture of a
software–intensive system based on the use of multiple and concurrent views. It is a multiple
view model that addresses different features and concerns of the system. It standardizes the
software design documents and makes the design easy to understand by all stakeholders.
It is an architecture verification method for studying and documenting software architecture
design and covers all the aspects of software architecture for all stakeholders. It provides four
essential views −

The logical view or conceptual view − It describes the object model of the design.

The process view − It describes the activities of the system, captures the concurrency
and synchronization aspects of the design.

The physical view − It describes the mapping of software onto hardware and reflects
its distributed aspect.

The development view − It describes the static organization or structure of the
software in its development of environment.
This view model can be extended by adding one more view called scenario view or use case
view for end-users or customers of software systems. It is coherent with other four views and
are utilized to illustrate the architecture serving as “plus one” view, (4+1) view model. The
following figure describes the software architecture using five concurrent views (4+1) model.
Fig: Architecture View model
Why is it called 4+1 instead of 5?
The use case view has a special significance as it details the high level requirement of a system
while other views details — how those requirements are realized. When all other four views
are completed, it’s effectively redundant. However, all other views would not be possible
without it.
UML diagrams for case study:
1.Use Case Diagram
Fig: Use case diagram for online shopping system
2.Sequence Diagram
Fig: Student login sequence diagram
3.Class Diagram
Fig: UML class diagram for online shopping system
4.Activity Diagram
Fig: Activity diagram for resolving software issue
StarUML
StarUML is a sophisticated software modeler aimed to support agile and concise modeling.
The main targets of users are:



Agile and small development teams
Professional persons
Educational institutes.
The key features of StarUML are:

















Multi-platform support (MacOS, Windows and Linux)
UML 2.x standard compliant
SysML support
Entity-Relationship diagram (ERD)
Data-flow diagram (DFD)
Flowchart diagram
Multiple windows
Modern UX
Dark and light themes
Retina (High-DPI) display support
MacPro Pro's Touch Bar support
Model-driven development
Open APIs
Various third-party extensions
Asynchronous model validation
Export to HTML docs
Automatic updates.
How to install StarUML
1. StarUML can be downloaded from http://staruml.io/download. Select the OS version
suitable for your system and click on the download button. Mine is Windows and is
doing it for Windows OS. The size of the file is 127 MB.
2. Run the .exe file.
3. After installation you can see the starUML icon on your desktop screen.
4. The software will open directly and it will ask for buy now option or evaluate option.
Click on Evaluate. The screen appears like this for evaluated version.
Fig: StarUML all sections
Conclusion: In this Practical, we have studied software engineering fundamentals, UML and
StarUML tool which is open source.
References:
http://gtu-paper-solution.com/Paper-Solution/SoftwareEngineering-2160701/Winter2017/Question-2a
https://www.javatpoint.com/software-engineering-tutorial
https://docs.staruml.io/user-guide/readme
https://www.includehelp.com/basics/software-characteristics.aspx
https://www.tutorialspoint.com/uml/uml_standard_diagrams.html
Download