Software Engineering – 1
(CS504)
Lecture Notes
Delivered by
Dr. Fakhar Lodhi
_____
© Copyright Virtual University of Pakistan
,CS504-Software Engineering – I VU
TABLE OF CONTENTS
Lecture 01: Introduction to Software Engineering…………………………...…….. 1
Lecture 02: Introduction to Software Development ……………………………… 11
Lecture 03: Requirement Engineering-1 …………………………………………… 16
Lecture 04: Requirement Engineering-2 …………………………………………… 20
Lecture 05: Relation of Several components of Software Requirements ……….. 28
Lecture 06: Use Case Diagram for a Library System ……………………………... 33
Lecture 07: Source and Sink Analysis ……………………………………………… 40
Lecture 08: State Transition Diagrams ……………………………………………... 44
Lecture 09: Typical Processes ………………………………………………………. 53
Lecture 10: Prototyping and GUI Design …………………………………………. 62
Lecture 11: Software Design ………………………………………………………… 69
Lecture 12: Coupling and Cohesion ……………………………………………….. 72
Lecture 13: Object Oriented Analysis and Design ………………………………... 83
Lecture 14: Object Oriented Analysis and Design-2 ……………………………… 89
Lecture 15: UML Object Model Notations ………………………………………… 92
Lecture 16: Derivation of Object Model-Coad Methodology ……………………. 93
Lecture 17: Derivation of Object Model-Coad Methodology -2 …………………. 95
Lecture 18: CASE STUDY: Connie’s Convenience Store …………………………. 97
Lecture 19: Identify Structure ……………………………………………………… 100
Lecture 20: Interaction Diagrams ………………………………………………….. 106
Lecture 21: Sequence Diagrams (Message Types) ……………………………….. 108
Lecture 22: Software and System Architecture ………………………………….. 115
_____
© Copyright Virtual University of Pakistan
,CS504-Software Engineering – I VU
Lecture 23: Architectural Views …………………………………………………… 122
Lecture 24: Architectural Models-I ………………………………………………... 126
Lecture 25: Architectural Models-II ……………………………………………….. 130
Lecture 26: Introduction to Design Patterns ……………………………………… 137
Lecture 27: Observer Pattern ………………………………………………………. 140
Lecture 28: Good Programming Practices and Guidelines……………………… 146
Lecture 29: File Handling Tips for C++ and Java ………………………………... 155
Lecture 30: Layouts and Comments in Java and C++…………………………… 162
Lecture 31: Coding Style Guidelines Continued... ……………………………….. 167
Lecture 32: Clarity Trough Modularity …………………………………………... 170
Lecture 33: Common Coding Mistakes ………………………………………….. 176
Lecture 34: Portability ……………………………………………………………… 179
Lecture 35: Exception Handling …………………………………………………… 184
Lecture 36: Software Verification and Validation ……………………………….. 192
Lecture 37: Testing vs. Development ……………………………………………... 195
Lecture 38: Equivalence Classes or Equivalence Partitioning ………………….. 199
Lecture 39: White Box Testing …………………………………………………….. 202
Lecture 40: Unit Testing ……………………………………………………………. 207
Lecture 41: Inspections vs. Testing ……………………………………………….. 210
Lecture 42: Debugging ……………………………………………………………... 213
Lecture 43: Bug Classes …………………………………………………………….. 216
Lecture 44: The Holistic Approach ………………………………………………... 224
Lecture 45: Summary ………………………………………………………………. 227
_____
© Copyright Virtual University of Pakistan
, CS504-Software Engineering – I VU
Lecture No. 1
Introduction to Software Engineering
An Introduction to Software Construction Techniques for Industrial Strength
Software
1.1 Introduction
Software engineering is an interesting subject. In order to understand this subject we will
need to look at a number of examples and case studies. And we will need to see how we
can develop good software and how it could be improved in different scenarios? Before
we move on to software engineering we need to understand what software actually is.
What is Software?
When we write a program for computer we named it as software. But software is not just
a program; many things other than the program are also included in software.
Some of the constituted items of software are described below.
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.
So the software is not just the code written in Cobol, Java, Fortran or C++. It also
includes the data and all the documentation related to the program.
Why is it important?
Undoubtedly software is playing a vital role in all the field of life these days. We can see
many software applications being operated around us in our daily routine.
Some of the major areas in which software has played an important role are identified as
under.
Business decision-making: Software systems have played a major role in businesses
where you have to analyze your data and on the basis of that analysis you have to
make business decisions. This process of data analysis and decision-making has
become very accurate and easy by the use of software.
Modern scientific investigation and engineering problem solving: Scientific
investigations and engineering problem solving require an intensive amount of
_____________________________________________________________________ 1
© Copyright Virtual University of Pakistan