Unit 1 Notes
Unit 1 Notes
Definition
Software engineering is the establishment and use of sound engineering principles in order to
obtain economically software that is reliable and works efficiently on real machines.
Software engineering encompasses a process, methods for managing and engineering software,
and tools.
Software engineering is the It involves using programming languages, frameworks, and tools to
create reliable and efficient software systems. Software engineers work to solve real-world
problems by building software that meets user needs and performs well. This field ensure
quality through structured processes like planning, analysis, coding , and debugging. As
technology advances, software engineering plays a crucial role in industries such as healthcare,
education, finance, and entertainment. It combines creativity, logic, and precision to create
innovative digital solutions.
The scope is vast and expanding rapidly. India is a global IT hub with numerous opportunities in
software development, testing, maintenance, and research. Emerging technologies like AI, cloud
computing, and cybersecurity further widen career options.
Software can be considered in a dual role. It is a product and, a vehicle for delivering a product.
As a product, it delivers the computing potential in material form of computer hardware.
Example
A network of computers accessible by local hardware, whether it resides within a cellular phone
or operates inside a mainframe computer.
i) As the vehicle, used to deliver the product. Software delivers the most important product of
our time- Information.
ii) Software transforms personal data, it manages business information to enhance
competitiveness, it provides a gateway to worldwide information networks (e.g., Internet) and
provides the means for acquiring information in all of its forms.
iii) Software acts as the basis for operating systems, networks, software tools and environments
Software Characteristics
Software is a logical rather than a physical system element. Therefore, software has
characteristics that are considerably different than those of hardware:
The relationship, often called the "bathtub curve", indicates that hardware exhibits relatively
high failure rates early in its life (these failures are often attributable to design or manufacturing
defects); defects are corrected and the failure rate drops to a steady-state level (ideally, quite
low) for some period of time.
As time passes, however, the failure rate rises again as hardware components suffer from the
cumulative effects of dust, vibration, abuse, temperature extremes, and many other
environmental maladies. Stated simply, the hardware begins to wear out.
The failure rate curve for software should take the form of the ―idealized curve ‖ shown in Fig 3.
Undiscovered defects will cause high failure rates early in the life of a program. However, these
are corrected (ideally, without introducing other errors) and the curve flattens as
shown. The idealized curve is a gross oversimplification of actual failure models the implication
is clear— software doesn't wear out. During its life, software will undergo change
(maintenance). As changes are made, it is likely that some new defects will be introduced,
causing the failure rate curve to spike as shown in Figure 1.2. Before the curve can return to the
original steady-state failure rate, another change is requested, causing the curve to spike again.
Slowly, the minimum failure rate level begins to rise—the software is deteriorating due to
change.
In order to build software that is ready to meet the challenges and it must recognize a few
simple realities:
• It follows that a concerted effort should be made to understand the problem
before a software solution is developed.
• It follows that design becomes a pivotal activity.
• It follows that software should exhibit high quality.
• It follows that software should be maintainable.
•
These simple realities lead to one conclusion: software in all of its forms and across all of its
application domains should be engineered.
The foundation for software engineering is the process layer. The software engineering process
is the glue that holds the technology layers together and enables rational and timely
development of computer software. Process defines a framework that must be established for
effective delivery of software engineering technology.
Software process:
The software process forms the basis for management control of software projects and
establishes the context in which technical methods are applied, work products (models,
documents, data, reports, forms, etc.) are produced, milestones are established, quality is
ensured, and change is properly managed.
Software engineering methods:
Software engineering methods provide the technical how-to‘s for building software. Software
engineering methods rely on a set of basic principles that govern each area of the
technology and include modelling activities and other descriptive techniques.
However, classes and objects alone will not help a program run as the developer desires. To
make this happen, we need to understand and apply the core principles to execute different
functionalities and ensure a program in an OOP language works according to project
requirements. The 4 core principles of OOP are:
Polymorphism
Encapsulation
Inheritance
Abstraction
These 4 principles make it easier to create flexible and scalable software solutions in object-
oriented programming
Class
Object
Inheritance
Encapsulation
Abstraction
Polymorphism
Message passing and
Dynamic Binding
Class
A class is a user-defined data type. It is a blueprint that defines the structure and behavior of its
objects, ensuring abstraction and modularity. It encapsulates data members (data members i.e.
variables or attributes) and member functions (methods or member functions) in a single unit.
Class in Java
To create (declare) a class, you need to use access modifiers followed by class keyword and
class_name.
// Printing values
[Link]();
}
}
Object
An object is an instance of a class, it specifies data members and member functions of that
object. Real-world entities are modeled using objects, which encapsulate data and functions.
For example, if you have a class Student, objects like s1 and s2 represent specific students with
their own skills, such as subject expertise, sports achievements, star performers, etc.
Encapsulation
Encapsulation binds the data members and member functions that operate on the data together
in one class. Data security and modularity as well as data integrity can be achieved by defining
access specifiers such as private, protected, and public control the visibility of these members
with OOP concept encapsulation. It gives the developer control over which parts of the class are
exposed and accessible.
Encapsulation is one of the four fundamental OOP concepts. The other three are inheritance,
polymorphism, and abstraction. Encapsulation in Java is a mechanism of wrapping the data
(variables) and code acting on the data (methods) together as a single unit. In encapsulation, the
variables of a class will be hidden from other classes, and can be accessed only through the
methods of their current class. Therefore, it is also known as data hiding. To achieve
encapsulation in Java −
Declare the variables of a class as private.
Provide public setter and getter methods to modify and view the variables values.
Benefits of Encapsulation
• A class can have total control over what is stored in its fields.
Inheritance
Inheritance is the programming design mechanism that allows one class (child class) to inherit
the properties and behavior of another class (parent/superclass). This helps your code become
reusable and makes your application more scalable. It essentially provides a workaround for
writing the same code over and over again for different classes.
Let’s say, for example, you have specific classes like bike, car, truck, etc. These classes would have
similar functionality and methods that you may want to call. You can create a parent class called
vehicle to hold these methods, such as openTrunk() for a car or loadCargo() for trucks, etc.,
instead of rewriting the code for each class.
In OOP terms:
UI Components Example
The inheritance types in OOP are based on the relationship between the parent and child
classes.
1. Single Inheritance
In single inheritance, the child class only has access to the methods and behaviour of one parent
class.
Inheritance in Java
// Base class
class Animal {
void eat() {
[Link]("This animal eats food.");
}
}
// Derived class
class Dog extends Animal {
void bark() {
[Link]("The dog barks.");
}
}
Java supports single, multilevel, and hierarchical inheritance. Multiple inheritance is not
supported with classes; interfaces are used for that purpose.
Hierarchical One base class, many child classes All OOP languages
Polymorphism
Polymorphism is one of the core concepts of object-oriented programming (OOP) that describes
situations in which something occurs in several different forms. In computer science,
polymorphism describes the concept that you can access objects of different types through the
same interface. Each type can provide its own independent implementation of this interface.
[Link] or compile-time
[Link]
Static Polymorphism
Like many other OOP languages, Java allows you to implement multiple methods within the
same class that use the same name. But Java uses a different set of parameters called method
overloading and represents a static form of polymorphism.
The parameter sets have to differ in at least one of the following three criteria:
-They need to have a different number of parameters, one method accepting 2 and another one
accepting 3 parameters
-The types of parameters need to be different, with one method accepting a String and another
one accepting a Long
-They need to expect the parameters in a different order. For example, one method accepts a
String and a Long, and another one accepts a Long and a String. This kind of overloading is not
advisable because it makes the API difficult to understand
In most cases, these overloaded methods provide a different but very similar functionality. Like
many other OOP languages, Java allows you to implement multiple methods within the same
class that use the same name.
// ...
switch (selection) {
case FILTER_COFFEE:
return brewFilterCoffee();
default:
[Link](brewCoffee(selection));
return coffees;
// ...
When you call one of these methods, the provided set of parameters identifies the method which
has to be called. In the following code snippet, we’ll call the method only with a CoffeeSelection
object. At compile time, the Java compiler binds this method call to the
Dynamic Polymorphism
This form of polymorphism doesn’t allow the compiler to determine the executed method. The
JVM needs to do that at runtime. Within an inheritance hierarchy, a subclass can override a
method of its superclass, enabling the developer of the subclass to customize or completely
replace the behaviour of that method. The example is show in Fig 5.
Doing so also creates a form of polymorphism. Both methods implemented by the super- and
subclasses share the same name and parameters. However, they provide different functionality.
Table 2 and Table 3 shows the comparison and differences between procedures and
object oriented programming paradigms
Below are some of the differences between procedural and object-oriented programming:
Adding new data and functions is not easy. Adding new data and function is easy.
Procedural programming does not have any Object-oriented programming provides data
proper way of hiding data so it is less secure. hiding so it is more secure.
Examples: C, FORTRAN, Pascal, Basic, etc. Examples: C++, Java, Python, C#, etc.
IV Software Development Life Cycle
The Software Development Life Cycle (SDLC) is a structured framework used by software
organizations to design, develop, and test high-quality software. It defines the entire process of
software production, from the initial idea to the final deployment and maintenance.
The goal of the SDLC is to produce high-quality software that meets or exceeds customer
expectations, reaches completion within time and cost estimates, and is efficient to maintain.
The software development life cycle is shown Fig 6.
Without a structured SDLC, software development becomes chaotic. Teams may miss
requirements, blow budgets, or deliver buggy code that doesn't solve the user's problem. SDLC
provides:
Visibility: Stakeholders know exactly what is happening at every stage.
Quality Control: Testing is integrated into the process, not an afterthought.
Risk Management: Potential pitfalls are identified during the planning phase.
Cost Estimation: Helps in predicting timelines and budgets accurately.
The Six Stages of the Software Development Life Cycle are shown in Fig 7
A task focuses on a small, but well-defined objective (e.g., conducting a unit test) that produces a
tangible outcome. A process framework establishes the foundation for a complete software
engineering process by identifying a small number of framework activities that are applicable to
all software projects, regardless of their size or complexity.
In addition, the process framework encompasses a set of umbrella activities that are applicable
across the entire software process. A generic process framework for software engineering
encompasses five activities:
In general, umbrella activities are applied throughout a software project and help a software
team manage and control progress, quality, change, and risk.
A basic understanding of the generic concepts and principles that apply to framework activities
The essence of problem solving, and consequently, the essence of software engineering practice:
1. Understand the problem (communication and analysis).
2. Plan a solution (modeling and software design).
3. Carry out the plan (code generation).
4. Examine the result for accuracy (testing and quality assurance).
• Testing
• Requirements gathering
• Quick design
• Prototype building
• Prototype evaluation by customers
• Prototype may be refined
Prototype thrown away and software developed using formal process. It is used to define the
requirement Prototyping
Strengths:
• Requirements can be set earlier and more reliably
• Customer sees results very quickly.
• Customer is educated in what is possible helping to refine requirements.
• Requirements can be communicated more clearly and completely
• Between developers and clients Requirements and design
options can be investigated quickly and Cheaply
Weaknesses:
–Requires a rapid prototyping tool and expertise in using it–a cost for
the development organisation
– Smoke and mirrors - looks like a working version, but it is not.
The Fig 11 and Fig 12 shows the RAD model and its demerits
4 Incremental Model
• Stated in a slightly more formal manner, the world view (WV) is composed of
a set of domains (Di), which can each be a system or system of systems in its
own right. WV = {D1, D2, D3, . . . , Dn}
• Each domain is composed of specific elements (Ej) each of which serves
some role in accomplishing the objective and goals of the domain or
component: Di = {E1, E2, E3, . . . , Em}
• Finally, each element is implemented by specifying the technical
components (Ck) that achieve the necessary function for an element:
Ej = {C1, C2, C3, . . . , Ck}
The main aim of the Agile model is to facilitate quick project completion. To accomplish this
task, agility is required. Agility is achieved by fitting the process to the project and removing
activities that may not be essential for a specific project. Also, anything that is a waste of time
and effort is avoided.
The meaning of Agile is swift or versatile. "Agile process model" refers to a software
development approach based on iterative development. Agile methods break tasks into smaller
iterations, or parts do not directly involve long term planning. The project scope and
requirements are laid down at the beginning of the development process. Plans regarding the
number of iterations, the duration and the scope of each iteration are clearly defined in advance.
The agile SDLC is shown in Fig 16. Fig 17 shows the phases of the Agile model.
Fig 16 Agile SDLC
Each iteration is considered as a short time "frame" in the Agile process model, which typically
lasts from one to four weeks. The division of the entire project into smaller parts helps to
minimize the project risk and to reduce the overall project delivery time requirements. Each
iteration involves a team working through a full software development life cycle including
planning, requirements analysis, design, coding, and testing before a working product is
demonstrated to the client.
1. Requirements gathering
2. Design the requirements
3. Construction/ iteration
4. Testing/ Quality assurance
5. Deployment
6. Feedback
1. Requirements gathering: In this phase, you must define the requirements. You should
explain business opportunities and plan the time and effort needed to build the project. Based
on this information, you can evaluate technical and economic feasibility.
2. Design the requirements: When you have identified the project, work with stakeholders to
define requirements. You can use the user flow diagram or the high-level UML diagram to show
the work of new features and show how it will apply to your existing system.
3. Construction/ iteration: When the team defines the requirements, the work begins.
Designers and developers start working on their project, which aims to deploy a working
product. The product will undergo various stages of improvement, so it includes simple,
minimal functionality.
4. Testing: In this phase, the Quality Assurance team examines the product's performance and
looks for the bug.
5. Deployment: In this phase, the team issues a product for the user's work environment.
6. Feedback: After releasing the product, the last step is feedback. In this, the team receives
feedback about the product and works through the feedback
1. Frequent Delivery
2. Face-to-Face Communication with clients.
3. Efficient design and fulfils the business requirement.
4. Anytime changes are acceptable.
5. It reduces total development time
Disadvantages(Cons) of Agile Model:
1. Due to the shortage of formal documents, it creates confusion and crucial decisions
taken throughout various phases can be misinterpreted at any time by different team
members.
2. Due to the lack of proper documentation, once the project completes and the developers
allotted to another project, maintenance of the finished project can become a difficulty.
The difference between SDLC and Agile model is shown in Fig 18.
Increment
Aspect Waterfall Iterative Spiral Agile V-Models al
Develop
ment Sequential Iterative Iterative Iterative Iterative Iterative
Approach
Planning,
Design, Planning Divided
Planning, Planning,
Coding, , Risk into
Sprint, Design,
Testing, Analysis, increments,
Review, Implement
Evaluatio Engineer each with
Linear Retrospe ation,
n ing, Planning,
ctive Testing,
(Repeate Testing Implementa
(Iterative Deploymen
d (Cyclical tion,
Cycles) t (Parallel)
Iterativel ) Testing
Phases y)
Flexibilit
Low High High High Moderate High
y
Continuo
Proactive Continuo Risk Proactive
us risk
Late risk us risk manageme risk
assessm
mitigation, managem assessme nt aligned manageme
ent,
Limited ent, nt, with nt,
Proactiv
adaptabilit Adaptabil Adaptabil phases, Adaptabilit
Risk e
y ity to ity to Moderate y to
Managem mitigatio
changes changes adaptability changes
ent n
Time-to-
Longer Faster Variable Faster Moderate Faster
Market
ent us us
Continuo Integrate
After us d After Continuous
Continuo
Implement througho through Implement throughout
us and c
ation ut out the ation increments
Testing iterations spiral
Adaptabi
Low High High High Moderate High
lity
Linear Easier to
Adaptive
Complexi approach, manage, Cyclical Traceability Adaptive
approach
ty Limited Adaptabil approac helps approach to
to
Managem adaptabilit ity to h, Risk-d manage c changes
changes
ent y changes
1. Modular design: OOP encourages dividing complicated systems into reusable parts (obj
ects).
5. Simplified code maintenance: OOP prevents data repetition and results in flexible code
.
The practical challenges in object-oriented software design include the pressure from
technologies, frameworks, and architectures to make design decisions. It may not align with
ideal scenarios, the complexity of real-world problems requiring multiple models for the same
problem, and the need for quality assessment techniques to go beyond high-level metrics. These
challenges highlight the need for more reality-oriented research in the field of object-oriented
software design.
Table 5 shows the challenges and key issues in each challenge in object-oriented software
engineering. Fig 20 shows the major challenges in navigating them.
S.N
Challenge Key Issue
o