Discovering Computers 2008 Chapter 13 Programming Languages and Program Development.

download Discovering Computers 2008 Chapter 13 Programming Languages and Program Development.

If you can't read please download the document

Transcript of Discovering Computers 2008 Chapter 13 Programming Languages and Program Development.

  • Slide 1
  • Slide 2
  • Discovering Computers 2008 Chapter 13 Programming Languages and Program Development
  • Slide 3
  • Applications vs. Program Languages User Oriented CPU Oriented
  • Slide 4
  • ProceduralNon-Procedural Program Language vs. Application
  • Slide 5
  • You Communicate CPU Application Program Language vs. Application
  • Slide 6
  • Computer Programs and Programming Languages What is a computer program? p. 664 Fig. 13-1 Next Series of instructions that tells CPU what to do known as perform tasks Created by a programmer using a programming language
  • Slide 7
  • Procedural Languages
  • Slide 8
  • Slide 9
  • Slide 10
  • What is debugging? Process of locating and correcting syntax and logic errors in program Harvard University, September 9, 1945
  • Slide 11
  • Why Program ?????? Communicate with programmer on the job Customize software Increase computer understanding Increase software understanding Promotion within the company Challenging and Fun Computer Programming Video
  • Slide 12
  • Computer Programs and Programming Languages What are low-level languages and high-level languages? p. 664 Next High-level language Low-level language Machine-dependent runs only on one type of computer Machine and assembly languages are low-level
  • Slide 13
  • Low-Level Languages What is machine language? p. 665 Fig. 13-2 Next Only language computer directly recognizes Uses a series of binary digits (1s and 0s) with a combination of numbers and letters that represent binary digits A dump
  • Slide 14
  • Low-Level Languages What is assembly language? p. 666 Fig. 13-3 Next Instructions made up of symbolic instruction codes, meaningful abbreviations and codes Source program contains code to be converted to machine language
  • Slide 15
  • Computer Programs and Programming Languages What are high-level languages? p. 665 Next High-level language Often machine-independent can run on many different types of computers and operating systems
  • Slide 16
  • Procedural Languages What is a procedural language? Next Uses series of English-like words to write instructions Programmer writes instructions that tell computer what to accomplish and how to do it BASIC, COBOL, and C
  • Slide 17
  • Procedural Languages What is COBOL? p. 668 Designed for business applications English-like statements make code easy to read, write, and maintain COmmon Business-Oriented Language
  • Slide 18
  • Procedural Languages What is C? p. 668 Powerful language originally designed to write operating system software Requires professional programming skills } for(int b = 0; b < 1; b++) { outp(PortAddr, 50); while((inp(PortAddr + 5) & 0x020) == 0); } for(int c = 0; c < 1; c++) { outp(PortAddr, 32); while((inp(PortAddr + 5) & 0x020) == 0); }
  • Slide 19
  • Object-Oriented Programming Languages What is an object-oriented programming (OOP) language? p. 669 Next Used to implement object-oriented design Major benefit is ability to reuse existing objects Event-driven checks for and responds to set of events Java, C++, C#, and Visual Basic are complete object-oriented languages Object is item that contains data and procedures that act on data Event is action to which program responds
  • Slide 20
  • Object-Oriented Programming Languages What is Java? p. 669 Fig. 13-8 Next Developed by Sun Microsystems Similar to C++ Used to develop Web applications Click to view Web Link, click Chapter 13, Click Web Link from left navigation, then click Java below Chapter 13
  • Slide 21
  • Object-Oriented Programming Languages What is C++? p. 670 Fig. 13-9 Next Includes all elements of C, plus additional features for working with object-oriented concepts Used to develop database and games because of its speed; applications; operating systems Click to view Web Link, click Chapter 13, Click Web Link from left navigation, then click C++ below Chapter 13
  • Slide 22
  • Object-Oriented Programming Languages What is C#? p. 670 Next Object-oriented programming language based on C++ Accepted as a standard for Web applications and XML-based Web services Click to view Web Link, click Chapter 13, Click Web Link from left navigation, then click C# below Chapter 13
  • Slide 23
  • Other Programming Languages and Development Tools A 4GL (fourth-generation language) is a nonprocedural language that enables users and programmers to access data in a database Structured Query Language Portland.accdb
  • Slide 24
  • Other Programming Languages and Development Tools Classic programming languages include: AdaALGOLAPLBASIC ForthFORTRANHyperTalkLISP LogoModula-2PascalPILOT PL/1PrologRPGSmalltalk
  • Slide 25
  • Other Program Development Tools What is a macro? p. 676 - 677 Fig. 13-17 Next Series of statements that instructs an application how to complete a task Prevents creating the same task over and over again How to create a simple macro in Microsof Excel
  • Slide 26
  • Web Page Development What is HTML (Hypertext Markup Language)? p. 678 Fig. 13-18 Next Used to create Web pages Click to view Web Link, click Chapter 13, Click Web Link from left navigation, then click HTML below Chapter 13
  • Slide 27
  • Web Page Development What is the common gateway interface (CGI)? p.679 - 680 Fig. 13-19 Communications standard that defines how Web server communicates with outside sources CGI scriptprogram that manages sending and receiving across CGI http://www.harrietcarter.com/
  • Slide 28
  • Web Page Development What is a scripting language? p. 680 - 681 Fig. 13-20 Next Typically easy to learn and use JavaScript Perl (Practical Extraction and Report Language) PHP (PHP: Hypertext Preprocessor) VBScript (Visual Basic, Scripting Edition) COD Script
  • Slide 29
  • Flash Expression Web Web Page Development What is Web page authoring software? p. 683 Next Creates sophisticated Web pages without using HTML Generates HTML Dreamweaver
  • Slide 30
  • Web Page Development Web 2.0 allows Web sites to provide a means for users to: Share personal information Allow users to modify Web site content Have application software built into the site
  • Slide 31
  • Web Page Development Most Web 2.0 sites use APIs Application Programming Interfaces An API enables programmers to interact with an environment such as a Web site or operating system
  • Slide 32
  • Multimedia Program Development What is multimedia authoring software? p. 684 Fig. 13-22 Combines text, graphics, animation, audio, and video into interactive presentation Used for computer- based training (CBT) and Web-based training (WBT) Software includes Toolbook, Authorware, and Director Multimedia Presentation
  • Slide 33
  • The Program Development Cycle What is the program development cycle? p. 685 - 686 Fig. 13-23 Next Steps programmers use to build computer programs Programming teamGroup of programmers working on program Scientific Method?
  • Slide 34
  • Structured Programming Starting in the 1960s, a number of techniques evolved to make program design more systematic and programs themselves easier to read and maintain. This type of design became known as structured programming. Avoid GOTO Statements
  • Slide 35
  • Step 1 Analyze Requirements What is involved in analyzing the requirements? p. 686 Fig. 13-24 Next 1.Review requirements 2.Meet with systems analyst and users 3.Identify input, output, processing, and data components IPO chart Identifies programs inputs, outputs, and processing steps
  • Slide 36
  • Programmer begins with general design and moves toward detailed design Step 2 Design Solution What is involved in designing the solution? p. 687 Next Object-oriented design Structured design, sometimes called top-down design Two approaches Devise solution algorithm, step-by-step procedure to solve problem
  • Slide 37
  • Design Solution The design of the program addresses all of the tasks the program must perform and how to organize or sequence them when coding the program. Design tools to plan the solution include: Pseudocode Flowcharts Structure Charts
  • Slide 38
  • Step 2 Design Solution What is pseudocode? p. 690 and 692 Fig. 13-35 Next Uses condensed form of English to convey program logic
  • Slide 39
  • Design Solution - Pseudocode
  • Slide 40
  • Step 2 Design Solution What is a program flowchart? p. 690 Fig. 13-32 Next Graphically shows logic in solution algorithm
  • Slide 41
  • Slide 42
  • Step 2 Design Solution What is flowcharting software? p. 690 - 691 Fig. 13-34 Next Used by programmers to develop flowcharts Click to view Web Link, click Chapter 13, Click Web Link from left navigation, then click Flowcharting Software below Chapter 13
  • Slide 43
  • Hierarchy Chart Hierarchy charts depict the overall organization of a program. Program modules should be arranged hierarchically, in a top-down design.
  • Slide 44
  • Step 2 Design Solution What is a hierarchy chart? p. 687 Fig. 13-25 Next Shows program modules graphically Also called structure chart
  • Slide 45
  • Step 2 Design Solution What is structured design? Technique that builds all program logic from combination of three basic control structures sequence control structure selection control structure repetition control structure
  • Slide 46
  • Step 2 Design Solution What is a sequence control structure? p. 688 Fig. 13-27 Next Control structure that shows actions following each other in order Control structure depicts logical order of program instructions
  • Slide 47
  • Step 2 Design Solution What is a selection control structure? p. 689 Fig. 13-28 Next Tells program which action to take, based on a certain condition Two types Case control structure If-then-else control structureyields one of two possibilities: true or false
  • Slide 48
  • Slide 49
  • Step 2 Design Solution What is a repetition control structure? p. 689 - 690 Figs. 13-3013-31 Next Enables program to perform one or more actions repeatedly Do-while control structurerepeats as long as condition is true Do-until control structurerepeats as long as the condition is false
  • Slide 50
  • Slide 51
  • Step 3 Validate Design What is involved in validating the design? p. 693 Next Check program design for accuracy Logic error Logic error design flaw that causes inaccurate results Test data Test data sample data that mimics real data that program will process Programmer checks logic for correctness and attempts to uncover logic errors Desk check Desk check programmers use test data to step through logic Inspection systems analyst reviews deliverables during the system development cycle
  • Slide 52
  • Step 4 Implement Design What is implementation? p. 693 - 694 Fig. 13-38 Next Writing the code that translates the design into a program Syntaxrules that specify how to write instructions Commentsprogram documentation Extreme programming (XP)coding and testing as soon as requirements are defined
  • Slide 53
  • Step 5 Test Solution Debugging is the process of making sure a program is free of errors, or bugs. Logic errors Syntax errors Testing insures that the programs work as planned. Alpha testing Beta testing Design Code Debug Document Syntax Error Ensure program runs correctly and is error free Logic Error
  • Slide 54
  • Step 6 Document Solution What is involved in documenting the solution? p. 696 Next Programmer performs two activities Reviews program coderemoves dead code, program instructions that program never executes Reviews documentation
  • Slide 55
  • Summary of Programming Languages and Program Development Various programming languages used to write and develop computer programs The program development cycle and the tools used to make this process efficient Web development and multimedia development tools Chapter 13 Complete