programming fundamentals lecture 3

34
Problem Solving by REHAN IJAZ Programming Fundamentals

Upload: rehan-ijaz

Post on 14-Apr-2017

69 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: Programming Fundamentals lecture 3

Problem Solving

by

REHAN IJAZ

Prog

ram

min

g Fu

ndam

enta

ls

Page 2: Programming Fundamentals lecture 3

Software Development Method

Page 3: Programming Fundamentals lecture 3

The Software Development Method is a process of building a good software and its phases provides Quality and Correctness of good software. All the phases are important in itself. One Wrong step can create a big mistake in the development of Software.

Software Development Method

Page 4: Programming Fundamentals lecture 3

Software Development Method

Requirement

Gathering

System Analysis

System Design

Coding

Testing

Deployment

Following 6 steps are followed for developing reliable, efficient and errorless Software.

Page 5: Programming Fundamentals lecture 3

Requirement gathering and analysis is the first and major stage. This phase is basically the brainstorming phase because it has the many sub stages for Feasibility Analysis Stages to check how much idea can put into action for development.

In this Stages, communication taking place between stakeholders, end users and the project team. So, all the persons which are related to the project ,gather information for software development.

• Identify and capture stakeholder requirements using customer interviews and surveys.

1.) Requirement Gathering and Analysis

Page 6: Programming Fundamentals lecture 3

This is the second phase where the entire system is defined in detail. In fact, In this stage Developer get a detailed blueprint of the various phases of the software that are to be developed in the project.

The system is divided into smaller parts (modules) to make it easier more manageable for the developers, designers, testers, project managers and other professionals who are going to work on the software in the later stages.

2.) System Analysis

Page 7: Programming Fundamentals lecture 3

In this phase the design of the system is prepared. The Design is developed by The analysts and designers. The System analyst design the logical design for the designers and then designer get the basic idea of designing the software design of Front end and back end both.

The system analyst and Designer work together in designing the software design and Designer design the best software design under the guidance of System Analyst.

3.) System Design

Page 8: Programming Fundamentals lecture 3

It is the logical part of the development process. In this phase lots of brains are working for coding and get the final successful result for the software. In this A team of programmers is assigned by the company to work on the software.

The work is subdivided under a sub-phase called Task Allocation, where each task is assigned different coder. So, the development process is working faster.

4.) Coding

Page 9: Programming Fundamentals lecture 3

By process of coding, then the final process testing is proceeding. When the software is ready it is sent to the testing department where Quality Analysts test it thoroughly for different errors by forming various test cases.

Once the testing department and Quality Analyst makes sure that the software is error-free, then it goes to the next stage. So, the testing process is complete when all the testing module is complete.

5.) Testing

Page 10: Programming Fundamentals lecture 3

This is the final phase of the software development process. In this stage, if the software runs on various systems by users or buyers and If it runs smoothly on these systems without any flaw, then it is considered ready to be launched.

If it generates error then it goes to Testing Department for Testing and many coders write a new code for developers errorless Software.

6.) Deployment/Implementation

Page 11: Programming Fundamentals lecture 3

Following are the famous software development models.

1. Waterfall model2. Prototyping model3. Incremental model4. Spiral model5. Rapid Application Development (RAD) model

Software Development Models

Page 12: Programming Fundamentals lecture 3

Problem Analysis :

Page 13: Programming Fundamentals lecture 3

Definition: the process of understanding the problems and users needs and proposing solutions to those problems.

Goal: gain a better understanding, before development begins, of the problem to be solved.

Avoid to jump to conclusions by identifying the root cause of the problem.

Identify the sources of information for system analysis.

Problem Analysis :

Page 14: Programming Fundamentals lecture 3

Write a simple and clear definition of the problem description

Establish an order of importance for all features of the system

Come to an agreement with all stakeholders Resolve conflicts by negotiation

Steps towards Problem Analysis Step1 : Gain agreement on the problem definition

Page 15: Programming Fundamentals lecture 3

This part of the analysis requires input from extremely knowledgeable, insightful and experienced persons.

Make sure that the problem identified is the real problem Sometimes, a problem hides other more important

problems Addressing the wrong problem leads to failure A problem can have several causes:

• Some might be eliminated by non-software solutions• More than one solution might be needed

Steps towards Problem Analysis Step 2 : Identify the root causes of the problem

Page 16: Programming Fundamentals lecture 3

Stakeholder: anyone who could be affected by the new system or has input to provide in the implementation of the new system

Complex problems always involve the input of different stakeholders that have different viewpoints on the problem. Users: will use the system Managers: will pay for the system, or will manage

the users

Steps towards Problem Analysis Step 3 : Identify stakeholders and users

Page 17: Programming Fundamentals lecture 3

IT people: will install, manage and maintain the system External regulators: will impose constraints on the

system operation System developers: will implement a solution to the

problem Forgetting one of these might lead to major rework later

on, or even to project failure.

Steps towards Problem Analysis Step 3 : Identify stakeholders and users

Page 18: Programming Fundamentals lecture 3

System is divided as: The system itself and its functionalities The things (outside the system) that interacts with the

system Actors:

Supplies, uses, or modifies the information in the system Someone or something, outside the system, that interacts

with the system

Steps towards Problem Analysis Step 4 : Define the system boundary

Page 19: Programming Fundamentals lecture 3

Constraint : a restriction on the degree of freedom we have in providing a solution

They are as important as requirements : they direct what the system should not do, or what the system should not be.

Steps towards Problem Analysis Step 5 : Identify the constraints on the system

Page 20: Programming Fundamentals lecture 3

A good, general understanding of the problem and its causes

Identified the stakeholders whose collective input and judgment will determine the nature of the System

A notion of the boundary of the system and its interface with the exterior

An understanding of the constraints imposed on the system

Steps towards Problem Analysis After that, we have :

Page 21: Programming Fundamentals lecture 3

Pseudocode is a detailed description of what a computer program or algorithm must do, expressed in a natural language rather than in a programming language.

Used as detailed steps in the process of developing a program.

It allows designers or lead programmers to express the design in great detail and provides programmers a detailed template for the next step of writing code in a specific programming language.

About Pseudocode

Page 22: Programming Fundamentals lecture 3

About Pseudocode

Page 23: Programming Fundamentals lecture 3

An informal definition : “a set of rules that precisely defines a sequence of operations.”

An algorithm is a step-by-step set of operations to be performed.

An algorithm is an effective method that can be expressed within a finite amount of space and time and in a well-defined formal language for calculating a function

About Algorithm

Page 24: Programming Fundamentals lecture 3

About Algorithm

•"←" is a shorthand for "changes to". For instance, "largest ← item" means that the value of largest changes to the value of item.

•"return" terminates the algorithm and outputs the value that follows

Page 26: Programming Fundamentals lecture 3

A flowchart is a formalized graphic representation of a logic sequence.

The purpose of a flow chart is to provide people with a common language or reference point when dealing with a project or process.

About Flowchart

Page 27: Programming Fundamentals lecture 3

Flowcharts use simple geometric symbols and arrows to define relationships.

In programming, for instance, the beginning or end of a program is represented by an oval. A process is represented by a rectangle, a decision is represented by a diamond and an I/O process is represented by a parallelogram. The Internet is represented by a cloud.

About Flowchart

Page 28: Programming Fundamentals lecture 3

Flowchart Shapes

Page 29: Programming Fundamentals lecture 3

About Algorithm

•"←" is a shorthand for "changes to". For instance, "largest ← item" means that the value of largest changes to the value of item.

•"return" terminates the algorithm and outputs the value that follows

Page 30: Programming Fundamentals lecture 3

About Flowchart

Page 31: Programming Fundamentals lecture 3

Flowchart Example

Page 32: Programming Fundamentals lecture 3

A process of executing a program or application with the intent of finding the software bugs

Process of validating that a software program or application or product meets the business and technical requirements

Blackbox Testing Whitebox Testing

Software Testing

Page 33: Programming Fundamentals lecture 3

Blackbox Testing Also called functional testing Focuses on the output generated against any input

and execution of the system Ignores the internal mechanism of the system

Software Testing

Page 34: Programming Fundamentals lecture 3

Whitebox Testing Also called structural testing , clear box testing and glass

box testing Takes into account the internal mechanism of a system You have full visibility of the internal workings of the

software product, specifically, the logic and the structure of the code.

Software Testing