Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sw development1 Software Development 1.Define the problem (Analysis) 2.Plan the solution 3.Code 4.Test and debug 5.Maintain and Document.

Similar presentations


Presentation on theme: "Sw development1 Software Development 1.Define the problem (Analysis) 2.Plan the solution 3.Code 4.Test and debug 5.Maintain and Document."— Presentation transcript:

1 sw development1 Software Development 1.Define the problem (Analysis) 2.Plan the solution 3.Code 4.Test and debug 5.Maintain and Document

2 sw development2 Code Write program in a specified language editor - key in- create source program –.cpp (if c++ is the language) compiling - create object program –Syntax error –.obj link - create executable –.exe Run –Logic errors Lab #1

3 sw development3 Problem Analysis Problems: Take one of the following tasks and write a set of instructions(a solution) so complete that another person could perform the task without asking questions 1.Make a cup of cocoa 2.Sharpen a pencil 3.Decide which number is the largest from a group of three numbers 4.Start a car(include directions regarding what to do if the car does not start 5.Buy a soda from the soda machine

4 sw development4 Problem Solving Identify, understand the problem Obtain additional information Read and reread to obtain additional information Alternatives List instructions that enable you to solve the problem by the selected method

5 sw development5 Problem Solving Some problems require a series of actions or an algorithmic colution –Exa. solving a complicated calculus program –Alphabetizing 10,000 names Other problems require reasoning built on knowledge and experience – heuristic solution Computers are better at algorithmic solutions Problems with problem solving –Define problem incorrectly –Don't identify a sufficient list of alternatives

6 sw development6 Analysis of the Problem 1. Determine what is given - input =>nouns, adjectives 2. Determine what is required - output =>nouns, adjectives 3. Determine the transformations needed(processing) -actions needed to produce the required output =>verbs, adverbs

7 sw development7 Example 1: Read three numbers, add them together and print the total.

8 sw development8 Example 2: Write a program to prompt the operator for the maximum and minimum temperature readings on a particular day, accept those readings as integers, and calculate and display on the screen the average temperature.

9 sw development9 Structured Programming Control structures –sequence –selection or IF-THEN-ELSE –repetition or looping –subprograms Top Down Design Modularity

10 sw development10 Design/Plan the solution Algorithm – a step by step procedure for solving a problem All programs are implementations of algorithms –subtasks - hierarchy chart –logic flowcharts pseudocode –test solution for correctness - trace

11 sw development11 Algorithm Algorithm – set of steps that defines how a task is performed Program – set of instructions written in appropriate language –Correctness –efficiency

12 sw development12 Pseudocode structured concise English statements used to state operations language independent,no standard use words and phrases that are in line with basic computer operations

13 sw development13 Pseudocode 1.Write statements in simple English 2.Write each instruction on a separate line. 3.Use keywords and indentation for control structures. 4.Write instructions from top to bottom, with only one entry and one exit.

14 sw development14 Pseudocode 1.Input - receiving information keywords - read, get Read - receive information from a record on a file Get - receive information from the keyboard. Read student_name Get system_date Read number_1,number_2 Get tax_code use one verb followed by one or more nouns

15 sw development15 Pseudocode 2. Output –putting information out put, output,display - screen print - printer write - file –Print smaller. –Print 'Program Completed' –Write customer_record to file –Output total_tax –Display 'End of Data'

16 sw development16 Output continued Labels –Print 'label' or Print "label" statement inside quotes is printed as it appears –Print 'x'// if x = 5 Yields x –Print x yields5 – Print 'X = ' and x yields:X = 5

17 sw development17 Pseudocode 3.Arithmetic use name of the operation or algebraic symbol add,subtract,multiply, divide, exponentiation + - * / ** x = algebraic expression –count = count + 1 –net pay = hourly_pay_rate * hours_worked –sales_tax = cost_price * 0.10 –sales_tax = price * tax_rate

18 sw development18 Pseudocode 4. Assignment - place information into a storage location Initialize, Set - give variable initial value Save,Store - save info for later = //preferred y = 3 note: does not mean equality –could involve calculation: –area = length * width

19 sw development19 Assignment Examples –counter = 0 –Initialize counter to zero –Set count to 1 –Initialize tot_accums to 0 –Set upper_limit to 100 –total_price = cost_price + sales_tax


Download ppt "Sw development1 Software Development 1.Define the problem (Analysis) 2.Plan the solution 3.Code 4.Test and debug 5.Maintain and Document."

Similar presentations


Ads by Google