Presentation is loading. Please wait.

Presentation is loading. Please wait.

Planning for the Solution

Similar presentations


Presentation on theme: "Planning for the Solution"— Presentation transcript:

1 Planning for the Solution
COP1006 4/22/2017 Planning for the Solution Lesson 3 McManus COP1006 COP1006_03

2 Computers are Dumb! You have to tell them what to do what to use
COP1006 4/22/2017 Computers are Dumb! You have to tell them what to do what to use in what order to do it and what to do if your user does not do what you want them to do! McManus COP1006 COP1006_03

3 Solutions Don’t reinvent the wheel! Use solutions that have been
COP1006 4/22/2017 Solutions Don’t reinvent the wheel! Use solutions that have been already proven successful been created just to be reused McManus COP1006 COP1006_03

4 We take these into consideration every time we create a program.
COP1006 4/22/2017 Solution Trade Offs Speed Readability Understandability Maintainability Reusability We take these into consideration every time we create a program. McManus COP1006 COP1006_03

5 How the Computer Stores Data
COP1006 4/22/2017 How the Computer Stores Data Files Program – set of instructions Data – raw pieces of facts database records Data (fields) files McManus COP1006 COP1006_03

6 COP1006 4/22/2017 Hierarchy of a DBMS McManus COP1006 COP1006_03

7 Terminology Semantics Syntax The concept or idea of the item
COP1006 4/22/2017 Terminology Semantics The concept or idea of the item Ex. The numeral three is an idea that humans have established representing the concept of three items Syntax The physical/visible representation of the idea Ex. “three” “3” McManus COP1006 COP1006_03

8 Organizing the Problem
COP1006 4/22/2017 Organizing the Problem Tools Algorithms Problem Analysis Chart (PAC) Structure/Interactivity Charts Input Processing Output (IPO) Chart Flowcharts Hierarchy Charts But…first we have to understand the Software Life Cycle McManus COP1006 COP1006_03

9 Software Life Cycle The Waterfall Model Problem Definition
COP1006 4/22/2017 Software Life Cycle The Waterfall Model Problem Definition Software & Architectural Design System Requirements Detailed Design Specifications Design Validation Coding* Testing/ Acceptance Operations/ Maintenance Indicates = reiterative steps after testing and verification of each phase *Implementation McManus COP1006 COP1006_03

10 Analyzing the Problem Understand the Problem
COP1006 4/22/2017 Analyzing the Problem Understand the Problem Analyze the Requirements of the Problem Figure out what will be the outcome Very often we’re not given the inputs to a problem, only the desired output. McManus COP1006 COP1006_03

11 PAC Payroll Example Given Data Required Results Processing Required
COP1006 4/22/2017 PAC Payroll Example Given Data Required Results Hours PayRate Gross Pay Processing Required Solution Alternatives GrossPay = Hours * PayRate Define the Hours Worked and Pay Rate as constants Define the Hours Worked and Pay Rate as variables Defined the Hours Worked and Pay Rate as input values McManus COP1006 COP1006_03

12 Structure Charts Don't we wish! Calculate Gross Pay
COP1006 4/22/2017 Structure Charts Calculate Gross Pay Obtain Input Values Print Pay Check PR HRS GP Don't we wish! *Includes data flow McManus COP1006 COP1006_03

13 Interactivity Charts Don't we wish! Calculate Gross Pay
COP1006 4/22/2017 Interactivity Charts Calculate Gross Pay Obtain Input Values Calculate Gross Pay Print Pay Check Don't we wish! Hourly Rate Hours Worked *Includes data flow McManus COP1006 COP1006_03

14 Input Processing Output (IPO)
COP1006 4/22/2017 Input Processing Output (IPO) Input Processing Output Hours Worked Pay Rate Enter Hours Worked Enter Pay Rate Calculate Pay Print Pay Gross Pay (the pay check) McManus COP1006 COP1006_03

15 Flowchart Originally used to describe the entire program.
COP1006 4/22/2017 Flowchart Originally used to describe the entire program. Now, used to define selection (decision) and repetition (looping) structures McManus COP1006 COP1006_03

16 Flowchart Symbols Flowlines Start/(End/Stop/Exit) Processing
COP1006 4/22/2017 Flowchart Symbols Flowlines used when direction is in doubt Start/(End/Stop/Exit) Processing I(input)/O(output) Decision Begin End Calculate Gross Pay Print Pay Check More Employees? McManus COP1006 COP1006_03

17 Example Flowchart Zzzzz! Alarm goes off! Snooze Snooze or Off? Snooze
COP1006 4/22/2017 Example Flowchart Zzzzz! Alarm goes off! Snooze or Off? Snooze = 9? Snooze < 9 Sleep or Get up? Sleep Ignore Alarm, Forget Boss, Forget Instructor – Probably creating a problem? Get Dressed. . . McManus COP1006 COP1006_03

18 COP1006 4/22/2017 Pseudocode Everything is included, but written in English rather than any one language’s syntax Useful for debugging Ex. Obtain PayRate Obtain HoursWorked GrossPay equals PayRate Multiplied by HoursWorked Print GrossPay McManus COP1006 COP1006_03

19 Documentation Internal External Written in different language styles
COP1006 4/22/2017 Documentation Internal External Written in different language styles McManus COP1006 COP1006_03

20 Internal Documentation
COP1006 4/22/2017 Internal Documentation Used to explain what is being done (and why) within the program Most often takes the form of comments within the program Written in Language that Programmer, not user, will understand ' Insert a new node in the binary search tree. ' If the root node is null, create the root node here. ' Otherwise, call the insert procedure of class TreeNo McManus COP1006 COP1006_03

21 External Documentation
COP1006 4/22/2017 External Documentation Manuals or Help menus to assist the user Includes User Manuals System Manuals User must be able to understand… Make text bold Select the text you want to change. Click Bold on the Formatting Toolbar. McManus COP1006 COP1006_03

22 Debugging the Solution
COP1006 4/22/2017 Debugging the Solution Walkthroughs Walking through the process to verify that the solution is solving the right problem and works correctly You can use any of the charts or Pseudocode for this step Helps find bugs McManus COP1006 COP1006_03

23 Coding After determining that the solution is correct
COP1006 4/22/2017 Coding After determining that the solution is correct Select the appropriate language Code the program McManus COP1006 COP1006_03

24 Testing Test the coded solution
COP1006 4/22/2017 Testing Test the coded solution Best done by someone other than the programmer McManus COP1006 COP1006_03

25 COP1006 4/22/2017 60% to 70% of all Faults found in large-scale software projects are specification and design faults. Where do most of these faults originate? Not fully understanding the problem and then creating a specification based on an erroneous problem definition. Industry’s high priority involves the development and use of techniques that will help find faults during the earliest phases. McManus COP1006 COP1006_03

26 Where to Place the Blame?
COP1006 4/22/2017 Where to Place the Blame? Nowhere! It is not the purpose to place blame when a fault is found… Only to fix the fault! McManus COP1006 COP1006_03

27 With team development…
COP1006 4/22/2017 With team development… new problems arise, such as: different styles of writing code, interface difficulties, different declared types (integer vs real) different understandings of the problem caused by communication problems, and even something as simple as the order in which variables are listed within a procedure’s call statement. McManus COP1006 COP1006_03

28 Next? Programming Structure McManus COP1006 COP1006 4/22/2017


Download ppt "Planning for the Solution"

Similar presentations


Ads by Google