Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9
Class VIII
L7 Algorithm design and problem
solving 7.1The Program Development life cycle. The program development life cycle is divided into five stages: analysis, design, coding, testing and maintenance. • Analysis • Design • Coding • Testing Analysis:-Before any problem can be solved ,it needs to be clearly defined and set out so anybody working on the solution understands what is needed.This is called the requirement specification Design Coding Analyis:-a detailed examination of anything complex in order to understand its nature or to determine its essential features. Abstraction :-keeps the key elements required for the solution to the problem and discards any unnecessary details and information that is not required. Decomposition:- breaks down a complex problem into smaller parts, which can then be subdivided into even smaller parts, that can be solved easily How a problem can be decompose into sub problems inputs – the data used by the system that needs to be entered while the system is active » processes – the tasks that need to be performed using the input data and any other previously stored data » outputs – information that needs to be displayed or printed for the users of the system » storage – data that needs to be stored in files on an appropriate medium for use in the future Examples of Alarm app Design:-The use of formal methods enables the process to be clearly shown for others to understand What are the methods for designing Structure diagrams:-are hierarchical, showing how a computer system solution can be divided into sub-systems with each level giving a more detailed breakdown
Flow chart:-A flowchart shows diagrammatically the steps required to complete
a task and the order that they are to be performed. Algorithm:-A step by step process to solve any problem Step1:-start. Step2:-initialize two variables a,b as int. Step3:input a,b, value from the user. Step4: start if a is equal to b the initialize sum as int. Step5: add a and b,store the value in sum variable. Step6:print sum. multiply a with b and store the result in product variable. Pseudocode:- Pseudocode is a simple method of showing an algorithm. It describes what the algorithm does by using English key words that are very similar to those used in a high-level programming language Coding:- Each module of the program is written using a suitable programming language and then tested to see if it works. Testing:-The completed program or set of programs is run many times with different sets of test data. This ensures that all the tasks completed work together as specified in the program design