chapter11 - Objectives Learn what a program is and how it...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Objectives Learn what a program is and how it can be developed Understand the difference between a low-level and high-level language Be introduced to low-level languages using the Assembly programming language as an example Learn about the structure of a program, including algorithms and pseudocode Objectives (continued) Gain an understanding of the basics of high-level programming languages using Java as an example Learn about variables and how they are used Be introduced to the Java operators Explore the different control structures used in programming Understand the terms associated with object-oriented programming What Is a Program? A collection of statements that solve a problem Must be converted into a language that the computer understands Algorithm: logically ordered set of statements Conversion process uses an interpreter or compiler Interpreter translates statements one-by-one Compiler reads all of the statements and creates a finished program I Speak Computer Determine what language you want to use Assembly for controlling hardware Java and JavaScript for Internet applications Lisp for working with artificial intelligence Visual Basic for a simple yet powerful GUI programming environment Others include. C, C++, Smalltalk, Delphi, and ADA, FORTRAN, and COBOL Types of Programming Languages Low-level Geared towards computer less understandable or like human language Machine language is lowest-level language Assembly resides between lowest-level and higher- level languages Assembler converts assembly code to machine language High-level Human-friendly language Figure 11-1 Different types of programming languages Low-level Languages Machine language includes only binary numbers Assembly uses more English-like statements Each statement corresponds to one machine instruction Programs run faster than programs in higher-level languages Closely tied to particular CPU type Harder to read and understand than higher-level languages Assembly Language Statements Consists of alphabetic instructions with operations and register indications mov moves values around mov cx, 8 add adds one to value to another mov cx, 3 mov dx, 8 add dx, cx sub subtracts one value from another Assembly Language Statements (continued) inc increments a value in the register inc dx cmp compares two values mov cx, 4 mov dx, 7 cmp dx, cx (zero flag is set if dx - cx = 0) jnz jumps to a specific location in the program jnz stop (Jumps to the section named stop if the zero flag is set) High-level Languages Easier to write, read, and maintain than low-level languages Accomplishes much more in a single statement Generally slower Must be either compiler or interpreted Many incorporate IDEs (integrated development environments) Interface that includes an editor, compiler, graphic designer, and more Figure 11-2 Microsoft Visual Studio .NET makes software development easier Structure of a Program...
View Full Document

Page1 / 69

chapter11 - Objectives Learn what a program is and how it...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online