Chapter 1 - Introduction to Computers and Programming

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

BASIC

Beginners All-purpose Symbolic Instruction Code. A general programming language originally designed to be simple enough for beginners to learn.

Visual Basic

A Microsoft programming language and software development environment that allows programmers to quickly create Windows-based applications.

instructions

A program is a set of _______________________.

Portability

A program's ability to run on several different types of of computer systems is called _________________.

Pascal

A structured, general-purpose language designed primarily for teaching programming.

C

A structured, general-purpose language developed at Bell Laboratories. C offers both high-level and low-level features.

defined

A variable must be ________________ before it can be used in a program.

disk

A(n) ______________ is an example of a secondary storage device.

variable

A(n) ________________ is a named storage location.

hierarchy chart

A(n) _________________ is a diagram that graphically illustrates the structure of a program.

Java

An object-oriented language invented at Sun Microsystems. Java may be used to develop programs that run over the Internet, in a Web browser.

C++

Based on the C language, C++ offers object-oriented features not found in C. Also invented at Bell Laboratories.

Main memory is commonly known as RAM (Random Access Memory), and secondary memory is also known as ROM (Read Only Memory). Once data has been written onto a ROM chip, it can not be removed and can only be read. Unlike main memory (RAM), secondary memory (ROM) retains its contents even when the computer is turned off. Secondary memory is referred to as being nonvolatile, whereas RAM is volatile.

Both main memory and secondary storage are types of memory. Describe the difference between the two.

Procedural programs are made of procedures, or functions. Object-oriented programs are centered on objects, which contain both data and the procedures that operate on the data.

Briefly describe the difference between procedural and object-oriented programming.

COBOL

Common Business-Oriented Language. A language designed for business applications.

programmed

Computers can do many different jobs because they can be ____________.

A key word has a special purpose, and is defined as part of a programming language. A programmer-defined identifier is a word or name defined by the programmer.

Describe the difference between a key word and a programmer-defined identifier.

A line is a single line as it appears in the body of a program. A statement is a complete instruction that causes the computer to perform an action.

Describe the difference between a program line and a statement.

Operators perform operations on one or more operands. Punctuation symbols mark the beginning or ending of a statement, or separates items in a list.

Describe the difference between operators and punctuation symbols.

The programmer steps through each statement in the program from beginning to end. The contents of variables are recorded, and screen output is sketched.

Describe the process of desk-checking.

Fetch: The CPU's control unit fetches the program's next instruction from main memory. Decode: The control unit decodes the instruction, which is encoded in the form of a number. An electrical signal is generated. Execute: The signal is routed to the appropriate component of the computer, which causes a device to perform an operation.

Describe the steps in the fetch/decode/execute cycle.

It translates each source code statement into the appropriate machine language statement.

Describe what a compiler does with a program's source code.

When modified source code goes through a compiler, it is translated into machine language instructions, called object code, in an object file. When a compiler generates an object file, however, it does not include machine code for any run-time library routines the programmer might have used. So, another program called the linker combines the object file with the necessary library routines. After this step is completed, an executable file is created, which contains machine language instructions and is ready to run on the computer.

Explain the difference between an object file and an executable file.

The preprocessor reads the source file searching for commands that begin with the # symbol. These are commands that cause the preprocessor to modify the source file in some way. The compiler translates each source code instruction into the appropriate machine language instruction, and creates an object file. The linker combines the object file with necessary library routines.

Explain the operations carried out by the preprocessor, compiler, and linker.

Source file: contains program statements written by the programmer. Object file: machine language instructions, generated by the compiler translated from the source file. Executable file: code ready to run on the computer. Includes the machine language from an object file, and the necessary code from library routines.

Explain what is stored in a source file, an object file, and an executable file.

Program instructions and data are stored in main memory while the program is operating. Main memory is volatile, and loses its contents when power is removed from the computer. Secondary storage holds data for long periods of time—even when there is no power to the computer.

Explain why computers have both main memory and secondary storage.

FORTRAN

Formula Translator. A language designed for programming complex mathematical algorithms.

Control Unit and Arithmetic Logic Unit (ALU)

Internally, the CPU consists of the ___________ and the ______________.

By the compiler

Is a syntax error (such as misspelling a key word) found by the compiler or when the program is running?

JavaScript

JavaScript can be used to write small programs that run in Web pages. Despite its name, JavaScript is not related to Java.

The Central Processing Unit (CPU), main memory, secondary storage devices, input devices, output devices.

List the five major hardware components of a computer system.

C#

Pronounced "C sharp." A language invented by Microsoft for developing applications based on the Microsoft .NET platform.

Python

Python is a general-purpose language created in the early 1990s. It has become popular in both business and academic applications.

Ruby

Ruby is a general-purpose language that was created in the 1990s. It is increasingly becoming a popular language for programs that run on Web servers.

Machine language; as this is the only language computers can understand.

Since computers can't be programmed in natural human language, algorithms must be written in a(n) ___________________ language.

CPU

The job of the __________________ is to fetch instructions, carry out the operations commanded by the instructions, and produce some outcome or resultant information.

Syntax

The rules that must be followed when constructing a program are called _______________.

input, processing and output.

The three primary activities of a program are _______________, _______________, and ________________.

Systems software and Applications software

The two general categories of software are _______________ and _________________.

A utility program

What do you call a program that performs a specialized task, such as a virus scanner, a file-compression program, or a data-backup program?

To imagine what the computer screen looks like while the program is running. This helps define input and output.

What does it mean to "visualize a program running"? What is the value of such an activity?

That a program may be written on one type of computer and run on another type.

What does portability mean?

The program's purpose, information to be input, the processing to take place, and the desired output.

What four items should you identify when defining what a program is to do?

The operating system

What fundamental set of programs control the internal operations of the computer's hardware?

The original value is overwritten.

What happens to a variable's current contents when a new value is stored there?

A chart that depicts each logical step of the program in a hierarchical fashion.

What is a hierarchy chart?

A unique number assigned to each section of memory.

What is a memory address? What is its purpose?

A logical error that occurs while the program is running.

What is a run-time error?

A set of well-defined steps for performing a task or solving a problem.

What is an algorithm?

A programming environment that includes a text editor, compiler, debugger, and other utilities, integrated into one package.

What is an integrated development environment?

A low-level language is close to the level of the computer, and resembles the system's numeric machine language. A high-level language is closer to the level of human readability, and resemble natural languages.

What is the difference between a high-level language and a low-level language?

Syntax error occurs when the program does not conform to the grammar of programming language, and compiler cannot compile the source file. While logic errors occur when the program does not do what the programmer expects it to do.

What is the difference between a syntax error and a logical error?

Application software is computer software designed to help the user perform specific tasks. And system software is computer software designed to operate the computer hardware and provide a platform for running the application software.

What is the difference between system software and application software?

To determine if a logical error is present in the program.

What is the purpose of testing a program with sample data or input?

Operating Systems; the most fundamental set of programs on a computer. The operating system controls the internal operations of the computer's hardware.

What type of software controls the internal operations of the computer's hardware?

Because their contents may be changed.

Why are variables called "variable"?

High-level languages are easier to read, write and maintain and are closer to the human language, while low-level language or machine language consists of binary code and is the only language understood by computers. So, it is easier to write programs in a high-level language than in machine language.

Why is it easier to write a program in a high-level language than in machine language?

Because the computer can be programmed to do so many different tasks

Why is the computer used by so many different people, in so many different professions?

Programs written in high-level languages can't be directly executed by CPU, whereas those written in machine language can. So, programs written in high-level languages must be translated into machine language before they can be run.

Why must programs written in a high-level language be translated into machine language before they can run?

To ease the task of programming. Programs may be written in a programming language, and then converted to machine language.

Why were computer programming languages invented?

application software

Word processing programs, spreadsheet programs, e-mail programs, Web browsers, and game programs belong to what category of software?

variables or programmer defined symbols

Words or names defined by the programmer are called ____________________.

key words

Words that have a special meaning in a programming language are called ____________________.

Output

_______________ is the information a program sends to the outside world.

Low level

________________ languages are close to the level of the computer.

Operators

_________________ are characters or symbols that perform operations on one or more operands.

Punctuation

__________________ characters or symbols mark the beginning of ending of programming statements, or separate items in a list.

High level

__________________ languages are close to the level of humans in terms of readability.

Input

_____________________ is information a program gathers from the outside world.

Low level language or machine language is the only language computers really process.

_____________________ is the only language computers really process.


Set pelajaran terkait

Unit 4- AP Government Culminating Activity

View Set

Ch. 25 Growth and Development of the Newborn and Infant

View Set

Chapter 29: Infection Prevention and Control

View Set