Programming Logic and Design Ninth Edition Flashcards
Combination of all the components required to process and store data using a computer
Combination of all the components required to process
and store data using a computer
Computer system
Equipment associated with a computer
Hardware
Computer instructions that tells the hardware what to do
Software
Instructions written by programmers
Programs
Writing software instructions
Programming
such as word processing,
spreadsheets, payroll and inventory, even games, app
Application software
such as operating systems like Windows,
Linux, or UNIX, Google Android and Apple IOS
System softwares
Data items such as text, numbers, images, and sound
Input
Calculations and comparisons performed by the central processing
unit (CPU)
Processing
- Resulting information that is sent to a printer,
a monitor, or storage devices after processing - A cloud based device is accessed through the Internet
Output
Used to write computer instructions called program code
– Writing instructions is called coding the program
– Examples
* Visual Basic, C#, C++, or Java
Programming language–
– Rules governing word usage and punctuation
– Mistakes in a language’s usage are syntax errors
Syntax
– Computer’s temporary, internal storage – random access memory (RAM)
– Volatile memory – lost when the power is off
Computer memory
– Nonvolatile memory
Permanent storage devices
Translates source code into machine language (binary language)
statements called object code
– Checks for syntax errors
Compiler or interpreter
– Input will be accepted, some processing will occur, and results will be
output
Program executes or runs
Understanding Simple Program Logic
* cannot execute
Programs with syntax errors
– Errors in program logic produce incorrect output
Logical errors
– Sequence of specific instructions in specific order
Logic of the computer program
– Named memory location whose value can vary
Variable
People for whom a program is written
Users or end users
– All supporting paperwork for a program
Documentation
is the sequence of steps or rules you
follow to solve a problem
algorithm
Most common planning tools
Flowcharts
– Pseudocode
Walking through a program’s logic on paper before you
actually write the program
Desk-checking
Plan the steps of the program and what they include
Planning the Logic
One of the most difficult aspects of programming
Understanding the Problem
is easier than the planning step
Coding
Compiler or interpreter
– Changes the programmer’s English-like high-level
programming language into the low-level machine
language
Translator program
Misuse of a language’s grammar rules
– Programmer corrects listed syntax errors
– Might need to recompile the code several times
Syntax error
Hundreds of programming languages available
– Choose based on features
– Similar in their basic capabilities
Coding the Program
Execute the program with some sample data to see
whether the results are logically correct
Test
is the process of finding and correcting
program errors
Debugging
Programs should be tested with many sets of data
Testing the Program
Process depends on program’s purpose
– May take several months
Putting the Program into Production
The entire set of actions an organization must take to
switch over to using a new program or set of programs
Conversion
Making changes after the program is put into production
Maintenance
Maintaining previously written programs
Common first programming job
Repeat the development cycle
Make changes to existing programs
English-like representation of the logical steps it takes to
solve a problem
Pseudocode
Pictorial representation of the logical steps it takes to solve
a problem
Flowchart
representation of a number-doubling
problem
start
input myNumber
set myAnswer = myNumber * 2
output myAnswer
stop
Pseudocode
repetition of a series of steps
loop
repeating flow of logic that
never ends
infinite loop
Data-entry value that the user will never need
– Sentinel value
Dummy value
Marker at the end of a file that automatically acts as a
sentinel
eof (“end of file”)
Testing a value
Making a decision
Diamond shape
Decision symbol
Arrows that connect steps
Flowlines
Start/stop symbols
– Shaped like a racetrack
– Also called lozenges
Terminal symbols
Represents output statements
– Parallelogram
Output symbol
Indicates input operation
– Parallelogram
Input symbol
Contains processing statements
such as arithmetic
– Rectangle
Processing symbol
Draw geometric shapes that contain the individual
statements
– Connect shapes with arrows
Drawing Flowcharts
is used to create simple text files
Text Editor
provides an
editor, compiler, and other programming tools
* Microsoft Visual Studio IDE
– Integrated development environment (IDE)
is a location on your computer screen at
which you type text entries to communicate with the
computer’s operating system
Command line
allows users to interact with a program in a graphical
environment
A graphical user interface, or GUI (pronounced gooey)
Major models or paradigms used by programmers
Understanding the Evolution
of Programming Models
Focuses on the procedures that programmers
create
Procedural programming
Focuses on objects, or “things,” and describes
their features (or attributes) and their
behaviors
Object-oriented programming