Programming 1, Chapter 1
Beginners All-purpose Symbolic Instruction Code. A general programming language originally designed to be simple enough for beginners to learn.
BASIC
How is computer programming like an art?
Because every aspect of a program should be carefully designed
How is computer programming like a science?
Because programs rarely work right the first time they are written and thus require a lot of testing, correction, and redesigning
A structured, general-purpose language developed at Bell Laboratories. And, it offers both high-level and low-level features.
C
A language invented by Microsoft for developing applications based on the Microsoft .NET platform.
C#
Based on the C language, _____ offers object-oriented features not found in C. Also invented at Bell Laboratories.
C++
Common Business-Oriented Language. A language designed for business applications.
COBOL
The _____ is the most important component in a computer because without it, the computer could not run software.
CPU
The instruction is encoded in the form of a number. The control unit decodes the instruction and generates an electronic signal.
Decode
The signal is routed to the appropriate component of the computer (such as the ALU, a disk drive, or some other device). The signal causes the component to perform an operation.
Execute
Formula Translator. A language designed for programming complex mathematical algorithms.
FORTRAN
The CPU's control unit fetches, from main memory, the next instruction in the sequence of program instructions.
Fetch
_____ refers to the physical components of which a computer is made.
Hardware
_____ is any data the computer collects from the outside world.
Input
_____ is information a program collects from the outside world. It can be sent to the program from the user, who is entering data at the keyboard or using the mouse.
Input
An object-oriented language that may be used to develop programs that run on many different types of devices.
Java
_____ can be used to write small programs that run in webpages. Despite its name, it is not related to Java.
JavaScript
Words that have a special meaning. these words may only be used for their intended purpose. they are also known as reserved words.
Key Words
_____ are mistakes that cause the program to produce erroneous results.
Logical errors
System software typically includes what types of programs?
Operating Systems, Utility Programs, and Software Development Tools
_____ perform operations on one or more operands. An operand is usually a piece of data, like a number.
Operators
_____ such as the CD (compact disc) and the DVD (digital versatile disc) are also used for data storage.
Optical devices
_____ is any information the computer sends to the outside world.
Output
_____ is information that a program sends to the outside world. It can be words or graphics displayed on a screen, a report sent to the printer, data stored in a file, or information sent to any device connected to the computer.
Output
A structured, general-purpose language designed primarily for teaching programming.
Pascal
_____ is centered on the procedure, or function.
Procedural programming
Words or names defined by the programmer. They are symbolic names that refer to variables or programming routines.
Programmer-Defined Identifiers
_____, which use words instead of numbers, were invented to ease the task of programming.
Programming languages
_____ is a cross between human language and a programming language. Although the computer can't understand it, programmers often find it helpful to write an algorithm in a language that's "almost" a programming language, but still very similar to natural language.
Pseudocode
_____ characters that mark the beginning or end of a statement, or separate items in a list.
Punctuation
_____ is a general-purpose language created in the early 1990s. It has become popular in both business and academic applications.
Python
_____ 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.
Ruby
_____ is a type of memory that can hold data for long periods of time, even when there is no power to the computer.
Secondary storage
_____ store data in solid-state memory, and has no moving parts and operates faster than a traditional disk drive.
Solid-state drives
Rules that must be followed when constructing a program.
Syntax
_____ dictates how key words and operators may be used, and where punctuation symbols must appear.
Syntax
_____ are illegal uses of key words, operators, punctuation, and other language elements.
Syntax errors
_____ are symbolic names that represent locations in the computer's random-access memory (RAM).
Variables
A Microsoft programming language and software development environment that allows programmers to quickly create Windows-based applications.
Visual Basic
Each byte is assigned a unique number known as an _____.
address
An _____ is a set of well-defined steps for performing a task or solving a problem.
algorithm
Programs that make a computer useful for everyday tasks are known as _____. These are the programs that people normally spend most of their time running on their computers.
application software
The _____ is designed to perform mathematical operations.
arithmetic and logic unit
The term bit stands for _____.
binary digit
_____ are numbers consisting of only 1s and 0s.
binary numbers
Each byte is divided into eight smaller storage locations known as _____.
bits
A computer's memory is divided into tiny storage locations known as _____.
bytes
The _____ is the part of a computer that actually runs programs.
central processing unit, or CPU,
a _____ is a system of devices.
computer
A _____ is a set of instructions that tells the computer how to solve a problem or perform a task.
computer program
The _____ coordinates all of the computer's operations. It is responsible for determining where to get the next instruction and regulating the other major components of the computer with control signals.
control unit
The programming process consists of several steps, which include _____ activities.
design, creation, testing, and debugging
The term _____ means the programmer starts reading the program, or a portion of the program, and steps through each statement.
desk-checking
A traditional _____ stores data by magnetically encoding it onto a circular disk.
disk drive
The most common type of secondary storage device is the _____.
disk drive
When a computer is running a program, the CPU is engaged in a process known formally as the _____.
fetch/decode/execute cycle
A _____ is a diagram that shows the logical flow of a program. It is a useful tool for planning each operation a program performs and the order in which the operations are to occur.
flowchart
A _____ is a diagram that graphically depicts the structure of a program. It has boxes that represent each step in the program. The boxes are connected in a way that illustrates their relationship to one another.
hierarchy chart
The easiest languages for people to learn are _____. They are called this because they are closer to the level of human readability than computer readability.
high-level languages
The device that collects the information and sends it to the computer is called an _____.
input device
The three primary activities of a program are _____.
input, processing, and output
Many development systems, particularly those on personal computers, have _____.
integrated development environments (IDEs)
_____ consist of a text editor, compiler, debugger, and other utilities integrated into a package with a single set of menus.
integrated development environments (IDEs)
A ______ is a single line as it appears in the body of a program.
line
the _____ combines the object file with the necessary library routines.
linker
In a broad sense, there are two categories of programming languages: _____.
low-level and high-level
A _____ is close to the level of the computer, which means it resembles the numeric machine language of the computer.
low-level language
The addresses are ordered from _____ to _____.
lowest; highest
A computer's CPU can only process instructions that are written in _____.
machine language
_____ is where the computer stores a program while the program is running, as well as the data with which the program is working.
main memory
Today, CPUs are small chips known as _____.
microprocessors
Computer scientists think of a positive charge as a switch in the _____ position, and a negative charge as a switch in the _____ position.
on; off
An _____ is the most fundamental set of programs on a computer.
operating system
The _____ controls the internal operations of the computer's hardware, manages all the devices connected to the computer, allows data to be saved to and retrieved from storage devices, and allows other programs to run on the computer.
operating system
The information is sent to an _____, which formats and presents it.
output device
C++ is popular not only because of its mixture of low- and high-level features, but also because of its _____.
portability
In _____, the programmer constructs procedures (or functions, as they are called in C++). The procedures are collections of programming statements that perform a specific task.
procedural programming
C++ is a language that can be used for two methods of writing computer programs: _______.
procedural programming and object-oriented programming
Once information is gathered from the outside world, a program usually _____ it in some manner.
processes
A _____ is a set of instructions a computer follows in order to perform a task.
program
A _____ is a set of instructions that a computer follows to perform a task.
program
A _____, or software developer, is a person with the training and skills necessary to design, create, and test computer programs.
programmer
A _____ is a special language used to write computer programs.
programming language
Main memory is commonly known as _____.
random-access memory or RAM
When a computer is performing the tasks that a program tells it to do, we say that the computer is _____ the program.
running or executing
A _____ is an error that occurs while the program is running. These are usually logical errors, such as mathematical mistakes.
runtime error
the _____ is a collection of code.
runtime library
Programs are commonly referred to as _____.
software
The software tools that programmers use to create, modify, and test software are referred to as _____.
software development tools
The statements written by the programmer are called _____.
source code
the file C++ programs are saved in is called the _____.
source file
A _____ is a complete instruction that causes the computer to perform some action.
statement
The programs that control and manage the basic operations of a computer are generally referred to as _____.
system software
A _____, which is similar to a word processing program, is used to write and save a C++ program.
text editor
the central processing unit consists of two parts:
the control unit and the arithmetic and logic unit (ALU).
A _____ performs a specialized task that enhances the computer's operation or safeguards data.
utility program
A _____ is a named storage location in the computer's memory for holding a piece of information.
variable
RAM is usually a _____ type of memory that is used only for temporary storage while a program is running.
volatile
A typical computer system consists of the following major components:
•The central processing unit (CPU) •Main memory •Secondary storage devices •Input devices •Output devices
What are the steps for writing a program?
1) Clearly define what the program is to do. 2) Visualize the program running on the computer. 3) Use design tools such as a hierarchy chart, flowcharts, or pseudocode to create a model of the program. 4) Check the model for logical errors. 5) Type the code, save it, and compile it. 6) Correct any errors found during compilation. Repeat Steps 5 and 6 as many times as necessary. 7) Run the program with test data for input. 8) Correct any errors found while running the program. Repeat Steps 5 through 8 as many times as necessary. 9) Validate the results of the program.
