Sunteți pe pagina 1din 65

REVIEW

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

These instructions need to be written in a language that is readily understood by computer

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

Software Development Process

Major Types of Software

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.

Scientific/Engineering/Graphics Business Productivity Entertainment Educational

3 types of Software licensees


1.

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

Proprietary Software License


The user is legally barred from making copies of the licensed Software. Generally, the license is for the personal use only

Types of Proprietary Licenses


1.
2. 3. 4.

Single User License Multi User License Concurrent User License Site License
Linux

Open Source Software Licenses


1.

Trail Based Software Licenses

What is Algorithm?
When faced with a problem:
1. 2. 3.

We first clearly define the problem Think of possible solutions

Select the one that we think is the best under the prevailing circumstances
And then apply that solution

4. 5.

If the solution woks as desired, fine; else we go back to step 2

Definition of Algorithm
A precise sequence of a limited number of unambiguous, executable steps that terminates in the form of a solution

Why Algorithm is useful? Why write Algorithm down?

Analysis of Algorithm
1.

2.
3. 4.

Computational time Memory Bandwidth Logic functions

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

Syntax and Semantics Errors

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

Object Oriented Design

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

Software Development and Maintenance

Software Development and Maintenance


Concept: What needs to be done? Feasibility: Preliminary exploration of possible solutions,

technologies, suppliers User Requirement: The user documents as much as he knows


about the job the system must do Developer Specs: Developer analyses users requirement, performs further investigation, and produces unambiguous specifications

Planning: Detailed plan specifying the required resources and expected deliverables

Software Development and Maintenance


Architecture: Decompose the problem into subsystems and define their relationships Detailed Design: Decompose further such that one person can manage each sub-subsystem Implementation: Design and code Integrating Testing: Bring the sub-subsystems together to form subsystems and test. Bring subsystems together to form the system and test Opr.& Maintenance: Use, Enhance, Adapt and Correct

Retirement: Phase it out when the time comes

Testing Phases

Database Management System


Data: Raw material is called data Information: useful material is called information Data Management: Management of data is called Data Management Database: A huge quantity of information Database Management System: A management system which efficiently access the database

Issues in Data Management

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

Flow Chart Symbols


Start or stop

Process

Flow line Continuation mark

Decision

Flow Chart for if statement


Entry point for IF block IF

Condition

Then

Process

Exit point for IF block

Note indentation from left to right

What is Data Structure?

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.

Selecting a Data Structure


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.

Some Questions to Ask

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

What is Software Engineering?


This is the process of utilizing our knowledge of computer science in effective production of software systems

Well Designed Software

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

2 major Part of Development

Construction

Requirement Gathering Design Development Coding Testing

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

Quality Focus Processes Methods Tools


Task Set

Method Process Quality Focus

T O O L S

Software Development Loop

Problem Definition Technical Development Solution Integration Status Quo


Status Quo

Problem Definition Technical Development Solution Integration

Software Engineering Phases

Vision Definition Development Maintenance

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

Business Requirements User Requirements Functional Requirements Non Functional Requirements

Requirement Statement Characteristics


Complete Correct Feasible Necessary Prioritized Unambiguous Verifiable

Several Components of Software 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

Graphical User Interface


Sketches of Application

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

Object Oriented Design


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

Why architecture is important?


Mutual Communication Early Design Discussion Reusable abstraction of a system

Architecture Attributes

Performance Security Safety Availability Maintainability

Architecture Design Process


System Structuring Control Modeling Modular Decomposer

Architecture Model
Logical View
End-user Functionality

Implementation View
Programmers Software management

Use Case View

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

Good Programming Practice


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

Software Verification and Validation

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

Software Testing Objective

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

Testing and Software Phases


Requirement Specification System Specification System Design Detailed Design

Acceptance Test Plan

System Integration Test Plan

Sub-system Integration Test Plan

Code and unit test

Production

Acceptance Test

System Integration test

Sub-system Integration test

White and Black Box Testing

White box Testing


In structural or white box testing we look inside the system and evaluate what it consists of and how is it implemented. The inner of a system consists of design, structure of code and its documentation etc. Therefore, in white box testing we analyze these internal structures of the program and devise test cases that can test these structures.

Black Box Testing


In this type of testing, a component or system is treated as a black box and it is tested for the required behavior. This type of testing is not concerned with how the inputs are transformed into outputs. As the systems internal implementation details are not visible to the tester. He gives inputs using an interface that the system provides and tests the output. If the outputs match with the expected results, system is fine otherwise a defect is found.

Algorithm Complexity

Coverage:

Statement Coverage Branch Coverage Path 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

Number of Edges: 6 Number of Nodes: 5 C(G) = 8-6+1 = 3

Unit Testing

Unit Testing Principal


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

Assessment-oriented: Writing the unit test forces us to deal


with design issues - cohesion, coupling.

Confidence-building: We know what works at an early stage.


Also easier to change when its easy to retest.

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

In this world, nothing is certain but death and taxes


Debugging is taken as an art but in fact it is a scientific process. What is Bug?

Software Defects, Software Bugs, Software Problems and

even Software Features.

Common Bugs

Memory and Resource Leakage Logical Errors Memory over runs Loop Errors Pointer Errors Boolean Errors

Best of luck for your Viva -Moonisa

S-ar putea să vă placă și