Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 13 Programming Languages and Program Development

Similar presentations


Presentation on theme: "Chapter 13 Programming Languages and Program Development"— Presentation transcript:

1 Chapter 13 Programming Languages and Program Development

2 Applications vs. Program Languages
User Oriented CPU Oriented

3 Program Language vs. Application
Procedural Non-Procedural

4 Program Language vs. Application
You Communicate CPU Application

5 Computer Programs and Programming Languages
What is a computer program? Series of instructions that tells CPU what to do known as “perform tasks” Created by a programmer using a programming language p. 664 Fig. 13-1 Next

6 Procedural Languages Visual Studio 2010 in beta

7

8 VB 2010 beta

9 What is debugging? Process of locating and correcting syntax and logic errors in program Dr. Grace Hopper Harvard University, September 9, 1945

10 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

11 Computer Programs and Programming Languages
What are low-level languages and high-level languages? High-level language Low-level language Machine and assembly languages are low-level Machine-dependent runs only on one type of computer p. 664 Next

12 Low-Level Languages What is machine language?
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 p. 665 Fig. 13-2 Next

13 Low-Level Languages What is assembly language?
Instructions made up of symbolic instruction codes, meaningful abbreviations and codes Source program contains code to be converted to machine language p. 666 Fig. 13-3 Next

14 Computer Programs and Programming Languages
What are high-level languages? High-level language Often machine-independent can run on many different types of computers and operating systems p. 665 Next

15 Uses series of English-like words to write instructions
Procedural Languages What is a procedural language? Programmer writes instructions that tell computer what to accomplish and how to do it Uses series of English-like words to write instructions BASIC, COBOL, and C Next

16 Procedural Languages What is COBOL? Designed for business applications
English-like statements make code easy to read, write, and maintain COmmon Business-Oriented Language p. 668

17 Procedural Languages What is C?
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); p. 668

18 Object-Oriented Programming Languages
What is an object-oriented programming (OOP) language? 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 p. 669 Next

19 Object-Oriented Programming Languages
What is Java? 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 p. 669 Fig. 13-8 Next

20 Object-Oriented Programming Languages
What is C++? 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 p. 670 Fig. 13-9 Next

21 Object-Oriented Programming Languages
What is C#? 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 p. 670 Next

22 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 Open Portland.accdb and do query Portland.accdb

23 Other Programming Languages and Development Tools
Classic programming languages include: Ada ALGOL APL BASIC Forth FORTRAN HyperTalk LISP Logo Modula-2 Pascal PILOT PL/1 Prolog RPG Smalltalk

24 Other Program Development Tools
What is a macro? 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 Show Exit database and Exit switchboard in Access. p Fig Next

25 Web Page Development What is HTML (Hypertext Markup Language)?
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 p. 678 Fig Next

26 Web Page Development What is the common gateway interface (CGI)?
Communications standard that defines how Web server communicates with outside sources CGI script—program that manages sending and receiving across CGI p Fig

27 Web Page Development What is a scripting language?
Typically easy to learn and use JavaScript Perl (Practical Extraction and Report Language) PHP (PHP: Hypertext Preprocessor) VBScript (Visual Basic, Scripting Edition) COD Script p Fig Next

28 Web Page Development What is Web page authoring software?
Creates sophisticated Web pages without using HTML Generates HTML Dreamweaver Expression Web Flash p. 683 Next

29 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

30 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

31 Multimedia Program Development
What is multimedia authoring software? 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 p. 684 Fig

32 The Program Development Cycle
What is the program development cycle? Steps programmers use to build computer programs Programming team—Group of programmers working on program Scientific Method? p Fig Next

33 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 Starting in the 1960s, a number of techniques evolved to make program design more systematic and programs themselves easier to read and maintain. These methods have often been identified with the term structured programming. Program Control Structures: Advocates of structured programming have shown that any program can be constructed out of three fundamental control structures: sequence, selection, and looping.

34 Step 1 — Analyze Requirements
What is involved in analyzing the requirements? Review requirements Meet with systems analyst and users Identify input, output, processing, and data components IPO chart—Identifies program’s inputs, outputs, and processing steps p. 686 Fig Next

35 Step 2 — Design Solution What is involved in designing the solution?
Object-oriented design Devise solution algorithm, step-by-step procedure to solve problem Two approaches Structured design, sometimes called top-down design Programmer begins with general design and moves toward detailed design p. 687 Next

36 Design Solution Pseudocode Flowcharts Structure Charts
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 The design, or plan, of the program must address all of the tasks the program must perform as well as how to organize or sequence them when coding the program. Program design tools help both analysts and programmers plan programs. Many such tools have been developed, but three of the most important are structure charts, program flowcharts, and pseudocode.

37 Step 2 — Design Solution What is pseudocode?
Uses condensed form of English to convey program logic p. 690 and 692 Fig Next

38 Design Solution - Pseudocode
The design, or plan, of the program must address all of the tasks the program must perform as well as how to organize or sequence them when coding the program. Program design tools help both analysts and programmers plan programs. Many such tools have been developed, but three of the most important are structure charts, program flowcharts, and pseudocode.

39 Step 2 — Design Solution What is a program flowchart?
Graphically shows logic in solution algorithm p. 690 Fig Next

40

41 Step 2 — Design Solution What is flowcharting software?
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 p Fig Next

42 Hierarchy Chart Hierarchy charts depict the overall organization of a program. Program modules should be arranged hierarchically, in a top-down design. Structure charts—unlike flowcharts and pseudocode, which show the specific processing logic involved in step-by-step program execution—depict the overall organization of a program. Structure charts show how the modules of a program—logically related operations that perform a well-defined task—are defined and how they connect to each other hierarchically (show the ET-99 here). Program modules should be arranged hierarchically, in a top-down fashion, so that their relationship to each other is apparent. Top-down design indicates that modules are defined first at the highest levels of the hierarchy, and then at successively lower levels.

43 Step 2 — Design Solution What is a hierarchy chart?
Shows program modules graphically Also called structure chart p. 687 Fig Next

44 Step 2 – Design Solution What is structured design?
sequence control structure Technique that builds all program logic from combination of three basic control structures selection control structure repetition control structure

45 Step 2 — Design Solution What is a sequence control structure?
Control structure that shows actions following each other in order Control structure depicts logical order of program instructions p. 688 Fig Next

46 Step 2 — Design Solution What is a selection control structure?
Tells program which action to take, based on a certain condition Two types Case control structure If-then-else control structure—yields one of two possibilities: true or false p. 689 Fig Next

47

48 Step 2 — Design Solution What is a repetition control structure?
Enables program to perform one or more actions repeatedly Do-while control structure—repeats as long as condition is true Do-until control structure—repeats as long as the condition is false p Figs –13-31 Next

49

50 Step 3 — Validate Design What is involved in validating the design?
Check program design for accuracy Programmer checks logic for correctness and attempts to uncover logic errors What is involved in validating the design? Desk check programmers use test data to step through logic Logic error design flaw that causes inaccurate results Inspection systems analyst reviews deliverables during the system development cycle Test data sample data that mimics real data that program will process p. 693 Next

51 Step 4 — Implement Design
What is implementation? Writing the code that translates the design into a program Syntax—rules that specify how to write instructions Comments—program documentation Extreme programming (XP)—coding and testing as soon as requirements are defined p Fig Next

52 Ensure program runs correctly and is error free
Step 5 — Test Solution Ensure program runs correctly and is error free 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 Logic Error Debug Debugging is the process of making sure a program is free of errors, or “bugs.” Debugging is usually a lengthy process, often amounting to more than 50 percent of the total development time for a program. Preliminary Debugging: The debugging process often begins after the program has been entered into the computer system. Rarely is a program error free the first time it runs. The computer's systems software usually provides the programmer with a list of informative error messages indicating the source of many of the errors. Two common types of errors are syntax errors and logic errors. A syntax error occurs when the programmer has not followed the rules of the language. A logic error, or run-time error, results when the command syntax is correct but the program is producing incorrect results. Testing: At some point in the preliminary debugging process, the program will appear to be correct. At this point, the programmer, or preferably someone else, will run the original program with extensive test data. Good test data will subject the program to all the conditions it might conceivably encounter when finally implemented. Most companies run on-site alpha tests to test programs; companies in the business of selling software also commonly run beta tests by distributing preliminary versions of the program to outside users. Syntax Error Document

53 Step 6 — Document Solution
What is involved in documenting the solution? Programmer performs two activities Reviews program code—removes dead code, program instructions that program never executes Reviews documentation p. 696 Next

54 Summary of Programming Languages and Program Development
Various programming languages used to write and develop computer programs Web development and multimedia development tools The program development cycle and the tools used to make this process efficient Chapter 13 Complete


Download ppt "Chapter 13 Programming Languages and Program Development"

Similar presentations


Ads by Google