CS 170 Final flash cards
1 / 68
Term:
Definition:
Show example sentence
Show hint
Keyboard Shortcuts
  • Previous
  • Next
  • F Flip card

Complete list of Terms and Definitions for CS 170 Final flash cards

Terms Definitions
quit command causes the machine to exit the loop.. without the quit the loop will just continue going round and round
register special high speed storage location
actual parameter the variable which is "passed to" a procedure when a procedure is called also called "arguements"
data type collection of valuesintegers, real, strin, char ,boolean
identifier sequence of letters and/or digits that being w/a LETTER. Conceptually they are names given to objects like programs or memory locations
if-then-else statements i. Enables us to build yes-no branch of the program
scope area in a program in which the identifier can be referneced
relays switches moved by electromagnets
running or executing carrying out instructions in a program
program statement individual command to the computer.. it corresponds to an imperative sentence in Englishex. writeln(‘ great idea ‘) which tells the computer to write the words “great ideas” on the screen
format of basic accumulator initialize accumulatorinitialize indexwhile there are more objects do let accumulator = object, operation, accumulator increment index
array 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
variable storage location in main memory, the value of which can change during program execution
3 classes of operations 1. declaration (Ex. var last name: string)2. definition (ex readln(lastname))3. reference (ex writeln(last name))
data the info being manipulated by a program
side effect reference to a non-local identifier
procedure declarations appear as the last part of the main programs declaration part
structured programming concept 1. simple sequence (1 arrow down)2. Branching (branches off main program, 2+ arrow)3. looping (branches off and loops back around and reapeats)
5 methodologies for describing functions: English descriptions, mathematical notation, computer programs, tables, and graphs
algorithm a method, procedure, or recipe for doing a joba. it always has outputs which are the results of an actionb. must have a sequence of steps that show what actions must be taken in order to obtain the outputc. steps must be will defined actions
Node: decision nodes.. at each decisions node the use is asked a question and the answer given serves to select the branch to follow
pos(x,y) means 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
concatenation process of taking 2 strings & putting them end to end & making 1 string out of them
parameter value or variable used by both a procedure and its calling program or subprogram
string expression 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
global identifiers identifiers only declared in the main program, can be used anyhere
position 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
formal parameter the identifier used as a parameter in the declaration of a procedure
optimization problems are where we try to find the best value for a parameter in some situationa. 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---
semantic errors spelling errors in the data
GUI graphical user interface
control structure statement that choose the path a computer will follow through a program
Root Node: the left-most box in a decision tree
top down design prob solving technique whereby we being a problem--statement written @ a very abstract level
stepwise refinement process of stating a problem in more and more precise detail
line comments 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.
boehm & jacobi structured programming concept
primary parts of a program 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
compiler translator of a computer program;
Mod remainder
DIV quotient
hiding 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
________variables hide __________ variables if mentioned in the procedure local,global
assignment statement codes the algorithm
database a store of information
ARC represent particular deciions the arrow in binary
function receives inputs and yields, for each input, a uniquely defined outputa. Ex. If F gets Egypt, it will return the name of its capital Cairo
2 types of storage for real numbers: 1. exponent2. significant digit
copy move leaves nothing behind and copy leaves everything behind, destroys or covers up objects in the destination location
code block headers 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
syntax errors errors in how you write the program for example forgetting a semi-colon at the end of a statement
λ empty string or 2 single 's or ' '
sentinel an item coming from the user indicating valid input
length finds the length of a string. We can find the length of string x by typing length(x)
accumulator 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
procedure used to divide large programs into smaller segments that are easier to read and understand (sub programs)
abstraction viewing something in terms of high level description instead of low level details
block definition, declaration, statement
instruction register holds the code (like 00101101) that tells what is to be done
operator is denoted as “+” & it concatenates two strings to produce a third for example z:=x+y;
computer code a name sometimes given to a program or a part of a program
database prog a program that stores such information and answers questions about it
program header 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
local identifiers declared w/in a procedure and can only be used within tha tprocedure. Have no meaning within the main program
loop program construction that provides a cyclic action
var declaration that indicates which memory location to useex. Var position1:string
computer program 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
syntax set of rules for governingg the constructino of valid constructs of a language