Shared Flashcard Set

Details

CS 170 Final flash cards
final exam
68
Computer Science
Undergraduate 1
05/10/2009

Additional Computer Science Flashcards

 


 

Cards

Term
Root Node:
Definition
the left-most box in a decision tree
Term
Node:
Definition
decision nodes.. at each decisions node the use is asked a question and the answer given serves to select the branch to follow
Term
computer program
Definition
list of commands that can be carried out by a computer—recipe of actions the machine is to perform and must be written in a language the computer can understand
Term
computer code
Definition
a name sometimes given to a program or a part of a program
Term
running or executing
Definition
carrying out instructions in a program
Term
compiler
Definition
translator of a computer program;
Term
primary parts of a program
Definition
i. Header, keywords begin, series of statements followed by semi colons, and the keyword end, followed by a period.
ii. Header must begin w/the word program
Term
program statement
Definition
individual command to the computer.. it corresponds to an imperative sentence in English
ex. writeln(‘ great idea ‘) which tells the computer to write the words “great ideas” on the screen
Term
syntax errors
Definition
errors in how you write the program for example forgetting a semi-colon at the end of a statement
Term
semantic errors
Definition
spelling errors in the data
Term
data
Definition
the info being manipulated by a program
Term
var
Definition
declaration that indicates which memory location to use
ex. Var position1:string
Term
if-then-else statements
Definition
i. Enables us to build yes-no branch of the program
Term
identifier
Definition
sequence of letters and/or digits that being w/a LETTER. Conceptually they are names given to objects like programs or memory locations
Term
string expression
Definition
can be an identifier or any string of printable characters surrounded by single quotation marks
--re important because they are the things that can be printed
Term
algorithm
Definition
a method, procedure, or recipe for doing a joba. it always has outputs which are the results of an action
b. must have a sequence of steps that show what actions must be taken in order to obtain the output
c. steps must be will defined actions
Term
assignment statement
Definition
codes the algorithm
Term
copy
Definition
move leaves nothing behind and copy leaves everything behind, destroys or covers up objects in the destination location
Term
operator
Definition
is denoted as “+” & it concatenates two strings to produce a third for example z:=x+y;
Term
length
Definition
finds the length of a string. We can find the length of string x by typing length(x)
Term
position
Definition
finds the position of one string inside another’s and is written as pos and pos(x,y) means “find the position of the first character in the first occurrence of x in string y”… if x is not in y then pos(x,y) will give 0
Term
loop
Definition
program construction that provides a cyclic action
Term
quit command
Definition
causes the machine to exit the loop.. without the quit the loop will just continue going round and round
Term
optimization problems
Definition
are where we try to find the best value for a parameter in some situation
a. Example: we wish to construct a cylinder made from 1000 centimeters of tin and we want to find the correct dimensions so that the cylinder has the largest possible volume---
Term
function
Definition
receives inputs and yields, for each input, a uniquely defined output
a. Ex. If F gets Egypt, it will return the name of its capital Cairo
Term
5 methodologies for describing functions:
Definition
English descriptions, mathematical notation, computer programs, tables, and graphs
Term
array
Definition
a savings table that can record up to any amount of entries on the computer memory and can be opened and viewed at any time
Term
accumulator
Definition
can have any name, and the object and operation can have many forms… the basic format can be used to add up deposits or do other similar tasks
Term
format of basic accumulator
Definition
initialize accumulator
initialize index
while there are more objects do
let accumulator = object, operation, accumulator
increment index
Term
database
Definition
a store of information
Term
database prog
Definition
a program that stores such information and answers questions about it
Term
program header
Definition
eginning of program and includes (a)the programmer’s name & other nominal info, (b) the input-output specification for the program, & (c) a brief description of how the code works
Term
code block headers
Definition
well-written code is organized into “blocks” of self-consistent code that do well-defined tasks such as reading, sorting, and calculating. Each block should begin w/enough comments to identify its purpose & its essential operation. Blocks are usually 5-20 lines in length and in many cases are organized as subroutines. In some cases, the author of a block my not be the same as the main author, and proper credit should be included in the header
Term
line comments
Definition
although you should write code that is so straightforward that its operation is obvious to any ready, occasionally you might want to add a short comment just to the right of a line of code to clarify its meaning. Comments are especially helpful at array declarations or at assignment statements where key computations occur.
Term
instruction register
Definition
holds the code (like 00101101) that tells what is to be done
Term
GUI
Definition
graphical user interface
Term
syntax
Definition
set of rules for governingg the constructino of valid constructs of a language
Term
variable
Definition
storage location in main memory, the value of which can change during program execution
Term
data type
Definition
collection of values
integers, real, strin, char ,boolean
Term
3 classes of operations
Definition
1. declaration (Ex. var last name: string)
2. definition (ex readln(lastname))
3. reference (ex writeln(last name))
Term
ARC
Definition
represent particular deciions
the arrow in binary
Term
control structure
Definition
statement that choose the path a computer will follow through a program
Term
boehm & jacobi
Definition
structured programming concept
Term
structured programming concept
Definition
1. simple sequence (1 arrow down)
2. Branching (branches off main program, 2+ arrow)
3. looping (branches off and loops back around and reapeats)
Term
λ
Definition
empty string or 2 single 's or ' '
Term
concatenation
Definition
process of taking 2 strings & putting them end to end & making 1 string out of them
Term
DIV
Definition
quotient
Term
Mod
Definition
remainder
Term
sentinel
Definition
an item coming from the user indicating valid input
Term
abstraction
Definition
viewing something in terms of high level description instead of low level details
Term
stepwise refinement
Definition
process of stating a problem in more and more precise detail
Term
top down design
Definition
prob solving technique whereby we being a problem--statement written @ a very abstract level
Term
procedure
Definition
used to divide large programs into smaller segments that are easier to read and understand (sub programs)
Term
procedure declarations
Definition
appear as the last part of the main programs declaration part
Term
global identifiers
Definition
identifiers only declared in the main program, can be used anyhere
Term
local identifiers
Definition
declared w/in a procedure and can only be used within tha tprocedure. Have no meaning within the main program
Term
block
Definition
definition, declaration, statement
Term
scope
Definition
area in a program in which the identifier can be referneced
Term
parameter
Definition
value or variable used by both a procedure and its calling program or subprogram
Term
register
Definition
special high speed storage location
Term
hiding
Definition
when two variables are given the same name, the local one takes precedence over the lgobal one...system always looks in the current block for meaning first
Term
side effect
Definition
reference to a non-local identifier
Term
formal parameter
Definition
the identifier used as a parameter in the declaration of a procedure
Term
actual parameter
Definition
the variable which is "passed to" a procedure when a procedure is called also called "arguements"
Term
relays
Definition
switches moved by electromagnets
Term
2 types of storage for real numbers:
Definition
1. exponent
2. significant digit
Term
________variables hide __________ variables if mentioned in the procedure
Definition
local,global
Term
pos(x,y) means
Definition
find the positiong of the 1st character in the 1st occurence of x in string Y... if x isnt in y, pos(xy) will give zero
Supporting users have an ad free experience!