1 Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall.

Slides:



Advertisements
Similar presentations
Symantec 2010 Windows 7 Migration EMEA Results. Methodology Applied Research performed survey 1,360 enterprises worldwide SMBs and enterprises Cross-industry.
Advertisements

Symantec 2010 Windows 7 Migration Global Results.
Simplifications of Context-Free Grammars
Variations of the Turing Machine
TK1924 Program Design & Problem Solving Session 2011/2012
AP STUDY SESSION 2.
1
1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 2 Getting Started.
Copyright © 2003 Pearson Education, Inc. Slide 1.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 4 Computing Platforms.
Processes and Operating Systems
David Burdett May 11, 2004 Package Binding for WS CDL.
Local Customization Chapter 2. Local Customization 2-2 Objectives Customization Considerations Types of Data Elements Location for Locally Defined Data.
Create an Application Title 1Y - Youth Chapter 5.
Process a Customer Chapter 2. Process a Customer 2-2 Objectives Understand what defines a Customer Learn how to check for an existing Customer Learn how.
CALENDAR.
© Tally Solutions Pvt. Ltd. All Rights Reserved Shoper 9 License Management December 09.
Chapter 7: Steady-State Errors 1 ©2000, John Wiley & Sons, Inc. Nise/Control Systems Engineering, 3/e Chapter 7 Steady-State Errors.
Welcome. © 2008 ADP, Inc. 2 Overview A Look at the Web Site Question and Answer Session Agenda.
Break Time Remaining 10:00.
Turing Machines.
Database Performance Tuning and Query Optimization
PP Test Review Sections 6-1 to 6-6
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 24.1 Test-Driving the Ticket Information Application.
Operating Systems Operating Systems - Winter 2010 Chapter 3 – Input/Output Vrije Universiteit Amsterdam.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Adding Up In Chunks.
MaK_Full ahead loaded 1 Alarm Page Directory (F11)
Skills for Success with Microsoft® Office 2010
: 3 00.
5 minutes.
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Chapter 9 Interactive Multimedia Authoring with Flash Introduction to Programming 1.
Types of selection structures
Speak Up for Safety Dr. Susan Strauss Harassment & Bullying Consultant November 9, 2012.
1 Titre de la diapositive SDMO Industries – Training Département MICS KERYS 09- MICS KERYS – WEBSITE.
Chapter 12 Programming Concepts and Languages
Chapter 12 Working with Forms Principles of Web Design, 4 th Edition.
Converting a Fraction to %
Clock will move after 1 minute
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Program Development and Programming Languages
Physics for Scientists & Engineers, 3rd Edition
Select a time to count down from the clock above
1.step PMIT start + initial project data input Concept Concept.
Introduction Peter Dolog dolog [at] cs [dot] aau [dot] dk Intelligent Web and Information Systems September 9, 2010.
Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming.
FIGURE 3-1 Basic parts of a computer. Dale R. Patrick Electricity and Electronics: A Survey, 5e Copyright ©2002 by Pearson Education, Inc. Upper Saddle.
Chapter 10 Behind the Scenes: Software Programming
Behind the Scenes: Building Applications
Programming System development life cycle Life cycle of a program
1 Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall.
1 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Building Applications.
Computer Programming Putting the machine under our command.
1 Technology in Action Chapter 7 Behind the Scenes: Software Programming.
Computers Are Your Future Tenth Edition Chapter 11: Programming Languages & Program Development Copyright © 2009 Pearson Education, Inc. Publishing as.
Technology in Action Chapter 10 Behind the Scenes: Software Programming Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
Technology In Action Chapter 10 © 2006 Prentice-Hall, Inc.1 Technology In Action Chapter 10 Behind the Scenes: Software Programming Chapter 10 Behind the.
© 2009 Prentice-Hall, Inc Technology in Action Chapter 10 Behind the Scenes: Software Programming.
Technology in Action Alan Evans Kendall Martin Mary Anne Poatsy Twelfth Edition.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall 1.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Chapter 13 A & B Programming Languages and the.
0 Course Medical Statistics with Informatics. Software programming.
Technology in Action © 2008 Prentice-Hall, Inc..
Behind the Scenes: Building Applications
Presentation transcript:

1 Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

2 Technology in Action Chapter 10 Behind the Scenes: Building Applications Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

3 Chapter Topics System development life cycle Life cycle of a program Problem statement Algorithms Moving from algorithm to code Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

4 Chapter Topics (cont.) Moving from code to machine language Testing programs Completing a program Selecting the right programming language Most popular programming languages Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

5 Reasons for Software Programming Some types of tasks are candidates for automation as a software program – –Routine – –Repetitive – –Work with electronic data – –Follow a series of clear steps A new software program can be created when existing programs do not suffice Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

6 Information Systems System – –A collection of pieces working together to achieve a common goal An information system includes – –Data – –People – –Procedures – –Hardware – –Software Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

7 System Development Life Cycle Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

8 Problem and Opportunity Identification The existing system is evaluated – –Problems are defined – –New proposals are reviewed – –Decisions are made to proceed with the projects – –The process is documented – –Relevant problems and opportunities are defined Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

9 Analysis A program specification (goals and objectives of the project) is developed A feasibility assessment is performed User requirements are defined Analysts recommend a plan of action Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

Design A detailed plan for programmers is developed Flowcharts and data-flow diagrams are used for the current and proposed system 10 Data-flow diagram Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

11 Development and Documentation Actual programming takes place First phase of the program development life cycle (PDLC) Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

12 Testing and Installation Program is tested for proper operation Program is installed for use Testing and results are documented Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

13 Maintenance and Evaluation Performance of the system is monitored Corrections and modifications to the program are made Maintenance procedures and results are documented Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

Mark’s “Bug” Interlude 1 st computer bug (1947) really was a bug!1 st computer bug (1947) really was a bug! Most computer programs contain bugsMost computer programs contain bugs That’s what patches are for right?That’s what patches are for right? Some favourites: Millenium Bug 1999 to 2000 changeoverMillenium Bug 1999 to 2000 changeover Many US rockets and space probesMany US rockets and space probes Intel Pentium CPU rounding error~0.006%Intel Pentium CPU rounding error~0.006% Toyota Prius – recall 160,000 carsToyota Prius – recall 160,000 cars 14 2Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 012 Pearson Education, Inc. Publishing as Prentice Hall

Ethics in IT The Association of Computing Machinery (ACM) and the Institute of Electrical and Electronic Engineers (IEEE) have established eight principles for ethical software engineering practices: 1. 1.Public 2. 2.Client and Employer 3. 3.Product 4. 4.Judgment 15 Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

Ethics in IT (cont.) Ethical software engineering practices: 5. 5.Management 6. 6.Profession 7. 7.Colleagues 8. 8.Self 16 Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

More of Mark’s Babbling Computers and software are used in many applications: medical treatments, control of nuclear equipment, etc.Computers and software are used in many applications: medical treatments, control of nuclear equipment, etc. When computer’s kill! 1987 Therac-25 (p477) radiation overdose1987 Therac-25 (p477) radiation overdose 2000 National Cancer Institute2000 National Cancer Institute When software doesn’t do what we want we often find workaroundsWhen software doesn’t do what we want we often find workarounds Physicians found a workaround but didn’t check resultsPhysicians found a workaround but didn’t check results Radiation overdose – physicians indicted murderRadiation overdose – physicians indicted murder 17 2Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 012 Pearson Education, Inc. Publishing as Prentice Hall

Joint Application Development (JAD) Helps designers adapt to changes in program specifications Includes customer involvement No communication delays Also referred to as: – –Accelerated design – –Facilitated team technique 18 Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

19 The Life Cycle of a Program Programming is the process of translating a task into a series of commands a computer will use to perform that task Programming involves – –Identifying the parts of a task the computer can perform – –Describing tasks in a specific and complete manner – –Translating the tasks into a language understood by the computer’s CPU Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

20 Program Development Life Cycle Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

21 Step 1: Describing the Problem The problem statement: – –Starting point of programming – –Describes tasks the program is to accomplish – –Describes how the program will execute the tasks – –Created through interaction between the programmer and the user – –Includes error handling, a testing plan, and output values Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

22 Program Goal: To compute the total pay for a fixed number of hours worked at a parking garage. Inputs: Number of Hours Worked a positive number Outputs: Total Pay Earned a positive number Process: The Total Pay Earned is computed as $7.50 per hour for the first eight hours worked each day. Any hours worked beyond the first eight are billed at $11.25 per hour. Error Handling: The input (Number of Hours Worked) must be a positive real number. If it is a negative number or other non-acceptable character, the program will force the user to re-enter the information. Testing Plan:INPUTOUTPUTNOTES 88*7.50Testing positive input 33*7.50Testing positive input 128* *11.25Testing overtime input –6–6 Error message/ask user to re-enter value Handling error Parking Garage Example Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

23 Step 2: Developing an Algorithm Algorithm development – –A set of specific, sequential steps that describe what the program must do – –Complex algorithms include decision points Binary (yes/no) Loop (repeating actions) – –Visual tools used to track algorithm and decision points Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

24 Flowchart and Pseudocode Underlined words are information items that appear repeatedly in the algorithm. 1. Ask the user how many hours they worked today 2. If the number of hours worked < = 8, compute total pay without overtime otherwise, compute total pay with overtime pay 3. Print total pay Bold terms show actions that are common in programming, such as reading data, making decisions, printing, and so on. FlowchartPseudocode Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

Top-Down Design Problem is divided into a series of high-level tasks Detailed subtasks are created from high-level tasks Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 25

Object-Oriented Analysis Classes (categories of inputs) are identified Classes are defined by information (data) and actions (methods or behaviors) Reusability is key 26 Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

27 Step 3: Coding Coding is translating an algorithm into a programming language Generations of programming languages – –1GL: Machine – –2GL: Assembly – –3GL: BASIC, COBOL, C/C++/C#, Python, & Java – –4GL: SQL, SAS, & Oracle Reports – –5GL: PROLOG Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

Java (OOP) vs C (sequential) public class MyStack { private Node top; public MyStack() { top = null; } public void push( Object obj ) public void push( Object obj ){ Node node = new Node( obj, top ); Node node = new Node( obj, top ); top = node; top = node;} public Object pop() { Node node = top; Node node = top; top = top.getNext(); top = top.getNext(); return node.getElement(); return node.getElement();} public boolean isEmpty() { return top == null; } } #define maxsize 100 int stack[maxsize]; int top = 0; void push( int item ) { if ( top < maxsize ) stack[top++] = item; else printf(“Stack Overflow Error\n”); } int pop() { if (top > 0) return stack[top--]; else printf(“Stack Underflow Error\n”); } int is_empty() { return top == 0; } Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 28

29 Compilation Compilation is the process of converting code into machine language A compiler reads the source code and translates it into machine language After compilation, programmers have an executable program Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

30 Interpreter Some programming languages do not have a compiler, but use an interpreter instead – –The interpreter translates source code into a line-by-line intermediate form – –Each line is executed before the next line is compiled – –Programmers do not have to wait for the entire program to be recompiled each time they make a change – –Programmers can immediately see the results of changes as they are making them Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

31 Coding Tools: Integrated Development Environments Integrated development environment: Tool that helps programmers as they enter the code – –Highlighting keywords – –Alerting them to typos Once editing is complete the compilation begins Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

32 Coding Tools: Integrated Development Environments Compiling identifies syntax errors and warnings – –Syntax error: Mistake in use of the language – –Warning: Suggestion from compiler that the code might not work as intended Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

Step 4: Debugging Running a program to find errors is known as debugging Sample inputs are used to determine runtime (logic) errors Debugger: Tool that helps programmers locate errors 33 Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

34 Step 4: Debugging (cont.) Debugging: Removal of errors in code – –Syntax error: Mistake in use of the language – –Logic error: Mistake caught only when the program executes – –Runtime error: Mistake in the algorithm Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

35 Step 5: Finishing the Project Internal testing: Group within the software company tests the program Beta version released – –Information collected about errors before final revision Software updates (service packs) – –Fix problems found after commercial release Documentation created Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

Popularity of Programming Languages 36 C/C++ and Java are among the most popular programming languages. Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

37 Programming Languages Selecting the right language – –Space available – –Speed required – –Organizational resources available – –Type of target application Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

38 Windows Applications: Visual Basic 2010 Used to build Windows applications Object-oriented language Visual Basic 2010 (VB 10.0) is the current version Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

39 C and C++ C – –Developed for system programmers – –Combines high- and low-level programming features – –Modern operating systems are written in C C++ – –Uses the same features as C – –Includes object-oriented design Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

40 Java Object-oriented features Large set of existing classes Architecture neutral Java applets: Small Java-based programs Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

41 Web Applications HTML/XHTML – –HyperText Markup Language/eXtensible HyperText Markup Language – –Not a true programming language – –Uses special symbols (tags) to control how Web pages are viewed Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

42 Web Applications (cont.) Scripting languages: Limited to performing a specific set of specialized tasks – –JavaScript: Used to make Web pages more visually appealing and interactive – –VBScript : Subset of VB used to add interactivity to Web pages – –PHP: Another scripting language gaining in popularity Dynamic decision making – –Web page can display content based on user choices Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

43 Web Applications (cont.) Active Server Pages (ASP), Java Server Pages (JSP), and PHP – –Add interactivity to Web pages – –Translate user information into a request for more information from a company’s computer Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

Adobe Flash and XML Flash – –Used to develop Web-based multimedia – –Includes its own scripting language, ActionScript SilverLight – –Supports development of multimedia and interactive Web applications 44 Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

AJAX AJAX (Asynchronous JavaScript And XML) – –Uses a combination of existing technologies like JavaScript, CSS, and XML – –Allows for information updates without a page refresh – –Allows for a more responsive user experience 45 Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

XML XML (eXtensible Markup Language) – –Enables designers to define data-based tags – –Groups can agree on standard systems of tags 46 Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

Blender Video game development tool Open source Built-in game engine Built-in physics engine Uses logic bricks to simplify programming 47 Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

48 The Next Great Language Large projects may take 30 minutes to compile Interpreted languages might become more important because they have minimal compile times – –Python – –Ruby – –Smalltalk Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

49 Chapter 10 Summary Questions What is a system development life cycle, and what are the phases in the cycle? Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

50 Chapter 10 Summary Questions What is the life cycle of a program? Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

51 Chapter 10 Summary Questions What role does a problem statement play in programming? Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

52 Chapter 10 Summary Questions How do programmers create algorithms? Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

53 Chapter 10 Summary Questions How do programmers move from algorithm to code, and in what categories of language might they code? Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

54 Chapter 10 Summary Questions How does a programmer move from code in a programming language to the 1s and 0s the CPU can understand? Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

55 Chapter 10 Summary Questions How is a program tested? Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

56 Chapter 10 Summary Questions What steps are involved in completing the program? Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

57 Chapter 10 Summary Questions How do programmers select the right programming language for a specific task? Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

58 Chapter 10 Summary Questions What are the most popular programming applications for Windows and Web applications? Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall

Chapter All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Copyright © 2012 Pearson Education, Inc. Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 59