Software Engineering
Software Engineering
1. Planning and Requirements Gathering: Identify and document user needs and system
requirements.
2. Design: Architectural design outlines the overall system structure; detailed design focuses on
specific components.
3. Implementation: Writing code in a programming language; developing software functionalities.
4. Testing: Systematic identification and fixing of defects; ensuring software meets requirements.
5. Deployment: Distributing the software to users; includes installation and configuration.
6. Maintenance: Ongoing support; includes bug fixing, updates, and possible enhancements.
Class Diagram
Class diagram is a static diagram. It represents the static view of an application. Class diagram is not
only used for visualizing, describing, and documenting different aspects of a system but also for
constructing executable code of the software application
Public, private and protected in class diagram
The visibility of the attributes and operations can be represented in the following ways −
Public − A public member is visible from anywhere in the system. In class diagram, it is prefixed by the
symbol ‘+’.
Private − A private member is visible only from within the class. It cannot be accessed from outside
the class. A private member is prefixed by the symbol ‘−’.
Protected − A protected member is visible from within the class and from the subclasses inherited
from this class, but not from outside. It is prefixed by the symbol ‘#’.
Association class
In UML diagrams, an association class is a class that is part of an association relationship between two
other classes An association class is identical to other classes and can contain operations, attributes,
as well as other associations. For example, a class called Student represents a student and has an
association with a class called Course, which represents an educational course. The Student class can
enroll in a course. An association class called Enrollment further defines the relationship between the
Student and Course classes
UML Interface
An interface is a collection of abstract methods that a class must implement. An interface defines a
contract for the behavior of a class, but does not provide an implementation. In UML, interfaces are
represented by a rectangle with the keyword “interface” before the name, and its methods are
usually represented as italicized and underlined.
In UML, it can exist between It is a part of the association It is a part of the aggregation
two or more classes. relationship. relationship.
It incorporates one-to-one, one- It exhibits a kind of weak relationship. It exhibits a strong type of
to-many, many-to-one, and relationship.
many-to-many association
between the classes.
It can associate one more objects In an aggregation relationship, the In a composition relationship, the
together. associated objects exist independently associated objects cannot exist
within the scope of the system. independently within the scope of
the system.
In this, objects are linked In this, the linked objects are Here the linked objects are
together. independent of each other. dependent on each other.
It may or may not affect the Deleting one element in the It affects the other element if one
other associated element if one aggregation relationship does not of its associated element is
element is deleted. affect other associated elements. deleted.
Example: A tutor can associate Example: A car needs a wheel for its Example: If a file is placed in a
with multiple students, or one proper functioning, but it may not folder and that is folder is
student can associate with require the same wheel. It may deleted. The file residing inside
multiple teachers. function with another wheel as well. that folder will also get deleted at
the time of folder deletion.
UML ARCHITECTURE
1. Use case view: -
It describes the use case that shows the behavior of the system as seen by its end users, analysts and
testers. The static aspect of this view is shown in use case diagram.
2. Design view: - It consists of classes, interfaces and collaborations required for the system. It
supports the functional requirements of the system. It specifies services that the system provides to
its end user. The static aspect is shown in class diagram and object diagram.
3. Process view:-
It focuses on threads and processes that form the system‟s concurrency and synchronization
mechanism. It addresses the performance, scalability and throughput of the system. Static aspect is
shown in class and object diagram.
4. Implementation view:-
It focuses on the components and files that are used to assemble and release the physical system. It
addresses configuration management of the system‟s releases. The static aspect of this view is shown
in component diagram.
Interface − Interface defines a set of operations, which specify the responsibility of a class.
Use case −Use case represents a set of actions performed by a system for a specific goal.
Node − A node can be defined as a physical element that exists at run time.
Behavioral Things
A behavioral thing consists of the dynamic parts of UML models. Following are the behavioral things
−
Interaction − Interaction is defined as a behavior that consists of a group of messages exchanged
among elements to accomplish a specific task.
State machine − State machine is useful when the state of an object in its life cycle is important. It
defines the sequence of states an object goes through in response to events. Events are external
factors responsible for state change
Grouping Things
Grouping things can be defined as a mechanism to group elements of a UML model together. There
is only one grouping thing available −
Package − Package is the only one grouping thing available for gathering structural and behavioral
things.
Annotational Things
Annotational things can be defined as a mechanism to capture remarks, descriptions, and comments
of UML model elements. Note - It is the only one Annotational thing available. A note is used to
render comments, constraints, etc. of an UML element.
Relationship
Relationship is another most important building block of UML. It shows how the elements are
associated with each other and this association describes the functionality of an application.
There are four kinds of relationships available.
Dependency
Dependency is a relationship between two things in which change in one element also affects the
other.
Association
Association is basically a set of links that connects the elements of a UML model. It also describes
how many objects are taking part in that relationship.
Generalization
Generalization can be defined as a relationship which connects a specialized element with a
generalized element. It basically describes the inheritance relationship in the world of objects.
Realization
Realization can be defined as a relationship in which two elements are connected. One element
describes some responsibility, which is not implemented and the other one implements them. This
relationship exists in case of interfaces.
UML Diagrams
UML diagrams are the ultimate output of the entire discussion. All the elements, relationships are
used to make a complete UML diagram and the diagram represents a system.
The visual effect of the UML diagram is the most important part of the entire process. All the other
elements are used to make it complete.
Class diagram
Object diagram
Use case diagram
Sequence diagram
Collaboration diagram
Activity diagram
Statechart diagram
Deployment diagram
Component diagram
PURPOSE OF COMPONENT DIAGRAM- The main purpose of the component diagram are enlisted
below:
It envisions each component of a system.
It constructs the executable by incorporating forward and reverse engineering.
It depicts the relationships and organization of components.
SDLC
The Software Development Life Cycle (SDLC) is a process used by the software industry to design,
develop, and test high-quality software. The SDLC aims to produce a high-quality software product
that meets or exceeds customer expectations, reaches completion within times and cost estimates,
and is efficient and bug-free.
Here's a brief overview:
1. Requirement Analysis: Identifying the specific requirements and needs for the software.
2. Design: Planning the software architecture and creating design specifications.
3. Implementation (or Coding): Actual coding of the software according to the design.
4. Testing: Checking the software for errors and bugs, and verifying it meets the required needs.
5. Deployment: Releasing the software to users.
6. Maintenance: Updating and improving the software over time based on user feedback and
evolving needs
Advantages:
1. Reusability and Modularity: OO testing benefits from the modularity and reusability of classes
and objects, making the testing process more efficient.
2. Maintainability: The encapsulation of data and behavior in objects makes the system easier to
understand and maintain, simplifying the testing process.
3. Flexibility: OO design allows for easier updates and changes, facilitating more adaptable testing
strategies.
4. Integration Testing: The interaction between objects can be tested incrementally, making
integration testing more manageable.
5. Hierarchical Testing: OO Testing can follow the hierarchy of classes, allowing for systematic
and organized testing strategies.
Disadvantages:
1. Complexity in Relationships: The relationships between objects (like inheritance and
polymorphism) can introduce complexities, making it harder to isolate issues.
2. State-Based Testing Challenges: Testing objects in different states can be complex, especially
when state dependencies are involved.
3. Initial Learning Curve: Understanding the intricacies of OO concepts for testing purposes can
be challenging, especially for testers unfamiliar with OO programming.
4. Overhead in Testing Inherited Features: Testing inherited features in subclasses can lead to
redundancy and increased testing time.
5. Integration Issues: While integration testing is more manageable, the intricate interactions
between objects can sometimes lead to unexpected issues, requiring thorough and careful
testing.
Types of Interaction Diagram-
1. Sequence Diagrams: Focus on the order of messages exchanged between objects over time.
2. Communication Diagrams: Emphasize the relationships and interactions between objects,
showing message flow.
3. Timing Diagrams: Visualize the behavior of objects across a specific time period, highlighting
state changes and interactions.
4. Interaction Overview Diagrams: Combine sequence and activity diagrams, providing a high-
level view of control flow with focus on interactions.
Generalization:
Represented by a line with a hollow arrowhead pointing from the subclass to the superclass.
Indicates an "is-a" relationship where the subclass is a more specific version of the superclass.
Example: A "Car" class as a superclass, and "ElectricCar" as a subclass.
Specialization:
The inverse of generalization, it's the process of creating new subclasses from an existing class.
Not represented as a separate symbol but is implicit in the generalization relationship.
Example: "ElectricCar" is a specialization of the more general "Car" class.
Inheritance: This is the mechanism where one class (known as a subclass or derived class) derives
properties and methods from another class (known as a superclass or base class). In UML diagrams,
inheritance is represented by a line with a hollow arrowhead pointing from the subclass to the
superclass.
Polymorphism: In UML, polymorphism is not represented by a specific symbol but is implied through
the use of inheritance. It's the ability of different classes to respond differently to the same message
(method call). This concept is typically understood in a UML diagram when a subclass inherits from a
superclass and overrides or implements its methods.