Shared Flashcard Set

Details

Programming Logic and Design
Programming Logic and Design
50
Computer Science
Undergraduate 1
04/24/2008

Additional Computer Science Flashcards

 


 

Cards

Term
 

7 steps to program development

Definition
 
  1. Understand the problem

  2. Plan the logic

  3. Code

  4. Translate to machine language

  5. Test

  6. Production

  7. Maintenance

Term

Errors with increasing severity

Definition

Syntax errors

-compiler error

Runtime errors

-abnormal ending to a program, (abend)

Logic errors

Term
 

Hierarchy of data

Definition

 

Character D

Field Dave

Record Dave Larkins

File Group of records

Term
 

Properties of Variables

Definition
 

Memory location (for the computer)

Identifier (for the human)

Data type (characters, #s, String)

Value

 

Term
 

Declare a variable

Definition
 

creates the variable in blanks or unused space (GRABBING) name and type

Term
 

Initializing a variable

Definition
 

empty a space for a variable and claims it for the program

 

Term
 

Assignment operator

Definition
 

inserts a value into a variable for use

Java, Count = 7

Term
 

Programming Structures-

Definition

sequence

selection

interation

Term
 

If, Then, Else- Selections or Decisions

Single Alternative If ( Unary)

Definition
 

in only one situation or category

-negative is when If = False

Ex: If x /= 3

Then (True)

End If

Only one side requires extra work

Term
 

Dual Alternative If ( Binary)

Definition
 

Yes or No….2 branches or possibilities

Ex:

If x = = 3

Then (True)

Else (continue)

Doing extra work both ways

 

Term
 

Structures

Definition
 

Clarity

Efficiency

Professionalism

Modularity

Term
 

Abstraction

Definition
 

provides a big picture view

Term
 

Functional cohesion

Definition
stick statements that contribute to the same job together
Term
 

Documentation

Definition
 

All supporting material that goes with a program.

Term
 

Internal Documentation

Definition

 

Comments- non executing statements stuck in code

-purpose, writer, last day compiled, assumptions, declare variables

-comments per paragragh

-comments for unique commands

Term
 

User Documentation

Definition
 

Instructions, manuals

Term
 

Output Documentation

Definition
 

creens, print layout, print chart, report requirements

Term
 

Input Documentation

Definition
 

what data is available, and requirements, security>entry screen

Term
 

Mainline logic

Definition

 

base program (traffic director)

-Controls the termination of the program

-90% of processes

-File Processing- reading records from a file

-GUI based user interaction

 

Term
 

*EOF (End of File indicator)

Definition
 

at the end of a file, often used to cue mainline logic to terminated command or the end of a program

Term
 

Housekeeping Module

Definition
 

runs once before opening the file, eof?, formats reports, opens files

Term
 

Processing Module

Definition
 

Guts of the program

Term
 

Finish up Module

Definition
 

runs at the end of the program, closes the file

 

Term
 

Priming Read

Definition
 

read the first record, done in Housekeeping

Term
 

Case Structures

Definition

 

Compound Selections

If … and/or …

-eliminates more than 1 variable

Not/or Condition (!=….or….) – always answers true

Term
 

Case (switch) structure

Definition
 

suited for decisions for a single variable

Term
 

Looping (iteration)

Definition

 

Main loop, Mainline logic- creates a set of instructions and lets us run them over and over again, and end program

Term
 

Pretest Loop

Definition
 

ask question and process

Term
 

Posttest Loop

Definition
 

process then ask question

"do...while"

Term
 

For Loop

Definition
 

lways pretest, finite loop

Finite loop-set to execute a set # of times

Term
 

Rolling Total

Definition
 

totals updated as data input, saves steps

Term
 

Hard Edits

Definition
 

stop users in tracks

Term
 

Soft Edits

Definition
 

suggest may be wrong

Term
 

Validation

Definition

 

-data type

-data range

-reasonability

-presence of data

Term
 

Exception handling-

Definition
 

the bulk of programming is there to validate functioning

Term
 

File merging

Definition

 

Merges files that are sorted the same

-new files are added to a “transaction file” and merged nightly

Term
 

Scope

Definition
the active module has scope

 

Term
 

ModuleCall

Definition
 

ModuleCall(argument, variable, parameter)

Term
 

Argument/parameter list

Definition
 

Number of variables

Correct datatype

Correct order

Term
 

Module coupling

Definition
 

Loose…data coupling

Control coupling

Pathological coupling

Term
 

Cohesion

Definition
 

Functional Cohesion is best

Term
 

Polymorphism

Definition

 

object can change its output based on the context it is used. Example: delete key.

 

-4 different methods, all with the same name. The calling module can know which one to use

Term
 

Overloading

Definition
 

a method that solves the same problem, but with different arguments, and varying order

Term
 

Methods

Definition
 

Usually public

Term
 

Attributes

Definition
 

Characteristics (height, W, letters, etc. color)

-public and private (generally private)

Term
 

Constructor method

Definition
 

creates instance

Term
 

Destructor method

Definition
 

dissolves instances when object goes out of scope.

Term
 

Client

Definition
 

uses a class object, instantiates object

Term
Pair programming
Definition

One partner designs the program.

 

The other codes. 

Supporting users have an ad free experience!