Lesson-1 introduction to Software, Software Engineering and Object Oriented Paradigm)
The Nature of Software... • Software is intangible. It's hard to understand development effort. •
Software is easy to reproduce. Cost is in its development.
•
The industry is labor-intensive. It's hard to automate.
•
There are chances of hacking. Quality problems are hard to notice.
•
Software is easy to modify. People make changes without fully understanding it
•
Software does not 'wear out'. It deteriorates by having its design changed: erroneously, or in ways that were not anticipated, thus making it complex.
By reading above, we can conclude: • Much software has poor design and is getting worse • Demand for software is high and rising • We are in a perpetual 'software crisis' • We have to learn to 'engineer' software
Types of Software • Custom o For
a specific customer
• Generic o Sold
on open market
o Often
called Commercial off the shelf (COTS) or shrink-wrapped
• Embedded o Built o Hard
into hardware to change
Types of Software (Another way)
• Real time software o E.g.
control and monitoring systems o Must react
immediately o Safety often a concern
• Data processing software o Used
to run businesses
o Accuracy
and security of data are key Some software has both
aspect
Good Software is maintained, bad software is discarded.
What is Software Engineering It is the process of solving customer problems by the systematic development and evolution of large, high-quality software systems within cost and time. Solving customers' problems is the goal of software engineering. Sometimes, solution lies in buying and not building. Adding unnecessary features does not help solve the problem. Software engineers must communicate effectively to identify and understand the problem. Software engineering is concerned with "engineering" software systems, that is, building and modifying software systems: • On time, • Within budget, • Meeting quality and performance standards, • Delivering the features desired/expected by the customer.
What software engineering is not.. • • •
Just building small or new systems. Hacking or debugging until it works. Easy, simple, boring or even pointless!
What's the need of Software Engineering Demand for software engineering is growing dramatically because:
• • • •
Software costs are growing per system Many projects have cost over-runs Many projects fail together S.E. seeks to find ways to build systems on time and within budget.
Activities Common to Software Projects: • Requirements and specification It includes: o Domain analysis o Defining the problem o Requirements gathering i.e. Obtaining input from as many sources as possible o Requirements analysis o Organizing the information o Requirements specification i.e. Writing detailed instructions about how the software should behave • Design It involves deciding how the requirements should be implemented, using the available technology. It includes: o Systems engineering: Deciding what should be in hardware and what in software o Software architecture: Dividing the system into subsystems and deciding how the subsystems will interact o Detailed design of the internals of a subsystem o User interface design o Design of databases • Modeling Modeling is creating representations of the domain or the software. It includes: o Use case modeling o Structural modeling o Dynamic and behavioural modeling • Programming • Quality Assurance It involves: o Reviews o Inspections o Testing • Deployment • Maintenance • Managing the process
What is the primary driver of Software Costs Requirements Design Implementation Testing Maintenance 67%
3% 8% 7% 15%
So most money and effort are spent in testing and maintenance. But, you must know that 85% of errors are introduced during requirements analysis and design.
The Object-oriented Paradigm The structured paradigm had great success initially. But, it started to fail with larger products i.e., with increase in size of software. Also, there were maintenance problems. The reason was that structured methods are action-oriented(data flow diagrams) or data-oriented (entity relationship diagrams), but not both. And. we know, both data and actions are important. An object is a software component that incorporates both data and actions, performed on that data. Example: Bank Account: Data : account balance Actions: deposit, withdraw, calculate balance.
Advantages of Object oriented Paradigm over Structured Approach • • • • •
Information Hiding (Physical Independence) Encapsulation (Conceptual Independence) Responsibility-driven approach Impact on development Impact on maintenance
Transition from Analysis to Design Structured Paradigm 1. Requirement Phase 2. Specification (Analysis) Phase 3. Design Phase 4. Implementation Phase 5. Interaction Phase 6. Maintenance Phase 7. Retirement Phase (software Obsolete)
Object Oriented Paradigm Requirement Phase Object Oriented Analysis Phase O.O. Design Phase O.O. Programming Phase Interaction Phase Maintenance Phase Retirement Phase (software Obsolete)
Analysis/Design Hump Systems Analysis: Determine what is the problem/ what is to be done • Design: Determine how to solve the problem It's got two parts: o Architectural Design: determine modules o Detail Design: design each module •
requirement gathering requirement analysis
requirement specific
Removing the hump, using OOP • Object-oriented Analysis o Determine what has to be done Determine the objects • Object-oriented design o Determine how to do it o Design the objects
o
Warning: Do not use the object-paradigm to enhance a product developed using the structured paradigm 1)
Exception: if the new part is totally disjoint, then you can do that. Example: adding a GUI (graphical user interface) 2)
Risks of Object oriented development: 1) 2)
Performance Start-up cost