Documente Academic
Documente Profesional
Documente Cultură
Introduction to Computing Introduction to Programming Data Structure Database Management System Fundamentals of Algorithms Software Engineering
What is Software?
The set of instructions that operates various parts of the hardware. Also termed as computer program
Computer Software
The Hardware needs Software to be useful & the Software needs Hardware to be useful. When the user needs something done by the computer, he/she gives instructions in the form of Software to computer Hardware
Machine Language
Machine language, though readily understood by microprocessors, is very difficult to write in for human programmers
Language Translator
Human programmers write programs in a language that is easy to understand for them. They use language translators to convert that program into machine language a language that is easy to understand for the Processor (CPU).
Software Development
The Software development process involves many steps, and coding, that is typing the instructions in a high-level language is only a small part of that process taking-up only around 15% of the effort
System Software
Programs that generally perform the background tasks in a computer. These programs, many times, talk directly to the Hardware
1. 2. 3.
Operating System Device Driver (Modem, Sound, etc ) Utility (Disk Operation, Compression etc)
Application Software
Programs that generally interact with the user to perform work that is useful to the user. These programs generally talk to the Hardware through the assistance of system Software
1. 2. 3. 4. 5.
Proprietary:
Most software on a Windows PC or a Macintosh belongs to this category
2.
Freeware:
Most software on a Linux PC belongs to that category
3.
Shareware:
The category which lies between the above two categories
Single User License Multi User License Concurrent User License Site License
Linux
What is Algorithm?
When faced with a problem:
1. 2. 3.
Select the one that we think is the best under the prevailing circumstances
And then apply that solution
4. 5.
Definition of Algorithm
A precise sequence of a limited number of unambiguous, executable steps that terminates in the form of a solution
Analysis of Algorithm
1.
2.
3. 4.
Golden Principal
1.
Break down the problem into small, simple sub-problems Arrange the sub-problems in such an order that each of them can be solved without effecting any other Solve them separately, in the correct order Combine the solutions of the sub-problems to form the solution of the original problem
2.
3.
4.
Deterministic Algorithm
An algorithm whose behavior can be completely predicted from the inputs
Randomized Algorithm
Any algorithm whose behavior is not only determined by the input, but also values produced by a random number generator
Heuristic Algorithm
An procedure that usually, but not always, works or that gives nearly the right answer
Algorithm Representation
Generally, Software developers represent them in one of three forms:
1.
Pseudo code
1. 2. 3.
Typically for algorithms Plain English Programming language with syntax errors A graphical representation of an algorithm, in which graphic objects are used to indicate the steps & decisions that are taken as the process moves along from start to finish (Symbols for start, process, condition, loop and finish)
2.
Flowcharts
3.
Actual code
Programming language with out syntax errors
What is Programming?
A sequence of steps is called Programming.
Two types of Programming 1. Batch Programming 2. Event Driven Programming Two Level of Programming 1. High Level Programming 2. Low Level Programming
The designer starts with any component (object) of the system; designs it as an independent, self-contained system, and then moves to the design of some other component Fitting together a collection Component are kept independent of the over-all system 2 Aspects Object: State Behavior
Structured Design
Also called Top down Design The designer starts by first conceiving a skeleton high-level design of the system, and then starts defining features of that over-all design in an everincreasing detail small changes in the functionality difficult to maintain & understand
Software Life-Cycle
The sequence of phases a Software goes through from the concept to decommissioning It is important to think about all those phases before the design work starts Thinking about the future phases generally results in:
Shorter delivery times Reduced costs of development A system of higher quality
Planning: Detailed plan specifying the required resources and expected deliverables
Testing Phases
Data Entry Data Updates Data Integrity Data Security Data Accessibility Data Deleting Database has Flat File Databases in which has some Records, records has some fields and record delimiter.
Some Terminologies
Relational DBMS Primary key Foreign key Queries Forms Reports Data Mining
Process
Decision
Condition
Then
Process
Data structures organize data more efficient programs More powerful computers more complex applications More complex applications demand more calculations.
Organizing Data
Any organization for a collection of records that can be searched, processed in any order, or modified. The choice of data structure and algorithm can make the difference between a program running in a few seconds or many days.
Efficiency
A solution is said to be efficient if it solves the problem within its resource constraints.
Space Time
The cost of a solution is the amount of resources that the solution consumes.
Select a data structure as follows: Analyze the problem to determine the resource constraints a solution must meet. Determine the basic operations that must be supported. Quantify the resource constraints for each operation. Select the data structure that best meets these requirements.
Are all data inserted into the data structure at the beginning, or are insertions interspersed with other operations? Can data be deleted? Are all data processed in some well-defined order, or is random access allowed?
What is Engineering?
The process of productive use of scientific knowledge is called engineering
It is reliable It has good user-interface It has acceptable performance It is of good quality It is cost-effective
Software Productivity
Project Management Requirement Engineering Design Coding Testing Software Quality Assurance Software Configuration Management Software Integration and Rest of the activities
Construction
Management
Construction
Project planning and management Configuration management Quality assurance Installation and training etc. Requirements Design Coding Testing Maintenance etc.
Management
Project Planning and Management Configuration Management Software Quality Assurance Installation and Training
Software Framework
T O O L S
Vision
Definition
Development
Maintenance
Software Requirements
A condition or capability needed by user to solve a problem or achieve an objective. A condition or capability that must be met or possessed by a system or system component to satisfy a contract, standard, specification, or other formally imposed document. A documented representation of a condition or capability as in 1 or 2. (Defined by IEEE)
Role of Requirement
Level of Requirements
Diagrams
Scope Diagram Business Process Model Activity Diagram State Transition Diagram Data Flow Diagram Use Case Diagram
Software Design
Managing Complexity of a Software System Software Design Process Software Design Strategies Software Design Qualities Maintainable Design Coupling and Cohesion Abstraction and Encapsulation Object Oriented Design
If requirements are not stable: System users often judge a system by its interface rather than its functionality A poorly designed interface can cause a user to make catastrophic errors Poor user interface design is the reason why so many software systems are never used Pitfalls of using GUIs in Functional Specifications UIs distract from business process understanding (what) to interfacing details (how) Unstable requirements cause frequent modifications in UIs An extra work to be done at the requirement level each time a GUI change has to be incorporated
The Object and the Class Classification Object Model Object Oriented Analysis Static Model Dynamic Model UML Object Oriented Notation Identify Structures Class Diagram/Object Model Associations Aggregations
Software Architecture
Architecture is the organizational structure of a system. An architecture can be recursively decomposed into parts that interact through interfaces, relationships that connect parts, and constraints for assembling parts. Parts that interact through interfaces include classes, components and subsystems
Architecture Attributes
Architecture Model
Logical View
End-user Functionality
Implementation View
Programmers Software management
Process View
System integrators Performance Scalability Throughput
Deployment View
System engineering System topology Delivery, installation Communication
Conceptual
Physical
Architecture styles
N
Tier architecture Tree Tier architecture Pipe and filters architecture Layered architecture Reference architecture Partitioning architecture
Maintainability Code Self Documentation Code Function size Identifier Names Coding Style Guide Classes and Interfaces
Comments in Coding Expression and Statement Clarity through Modularity Performance Portability Exception Handling
Verification
Does the product meet system specifications? Have you built the product right? Does the product meet user expectations? Have you built the right product?
Validation
Defect
A defect is a variance from a desired product attribute. These attributes may involve system specifications well as user expectation. Anything that may cause customer dissatisfaction, is a defect
The correct approach to testing a scientific theory is not to try to verify it, but to seek to refute the theory. That is to prove that it has errors. (Popper 1965) The goal of testing is to expose latent defects in a software system before it is put to use. A software tester tries to break the system. The objective is to show the presence of a defect not the absence of it. Testing cannot show the absence of a defect. It only increases your confidence in the software. This is because exhaustive testing of software is not possible it is simply too expansive and needs virtually infinite resources.
Successful Test
A test is said to be successful if it discovers an errors by Doctors analogy
Issues in Testing
Testing limitations Test Cases and Test Data Testing versus Development Usefulness of Testing
Production
Acceptance Test
Algorithm Complexity
Coverage:
Flow Chart
1
Sample Code
for (i = 0; i < N; i++) { //1 if (condition1) // do something here //2 else // do something here //3 // something here //4 }
2 3
Complexity of Algorithm
Unit Testing
In unit testing, developers test their own code units (modules, classes, etc.) during implementation. Normal and boundary inputs against expected results are tested. Thus unit testing is a great way to test an API.
Quantitative Testing
Repeatable: Unit test cases can be repeated to verify that no Bounded: Narrow focus simplifies finding and fixing defects. Cheaper: Find and fix defects early
unintended side effects have occurred due to some modification in the code.
Qualitative Testing
Defect Origination
Requirements Design Coding User documentation Testing itself can cause defects due to bad fixes Change requests at the maintenance or initial usage time
Inspection Checklist
Exception Managements Fault Classes Data Faults Control Faults Input/Output Faults Interface Faults Storage Management Faults
Debugging
Common Bugs
Memory and Resource Leakage Logical Errors Memory over runs Loop Errors Pointer Errors Boolean Errors