Programming Logic and Design Flashcards

Terms Definitions
  7 steps to program development
  Understand the problem
Plan the logic
Translate to machine language
Errors with increasing severity
Syntax errors

-compiler error

Runtime errors

-abnormal ending to a program, (abend)

Logic errors
  Hierarchy of data
Character D
Field Dave
Record Dave Larkins
File Group of records
  Properties of Variables
  Memory location (for the computer)
Identifier (for the human)
Data type (characters, #s, String)
  Declare a variable
  creates the variable in blanks or unused space (GRABBING) name and type
  Initializing a variable
  empty a space for a variable and claims it for the program
  Assignment operator
  inserts a value into a variable for use
Java, Count = 7
  Programming Structures-
  If, Then, Else- Selections or Decisions
Single Alternative If ( Unary)
  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
  Dual Alternative If ( Binary)
  Yes or No….2 branches or possibilities
If x = = 3
Then (True)
Else (continue)
Doing extra work both ways
  provides a big picture view
  Functional cohesion
stick statements that contribute to the same job together
  All supporting material that goes with a program.
  Internal Documentation
Comments- non executing statements stuck in code
-purpose, writer, last day compiled, assumptions, declare variables
-comments per paragragh
-comments for unique commands
  User Documentation
  Instructions, manuals
  Output Documentation
  creens, print layout, print chart, report requirements
  Input Documentation
  what data is available, and requirements, security>entry screen
  Mainline logic
base program (traffic director)
-Controls the termination of the program
-90% of processes
-File Processing- reading records from a file
-GUI based user interaction
  *EOF (End of File indicator)
  at the end of a file, often used to cue mainline logic to terminated command or the end of a program
  Housekeeping Module
  runs once before opening the file, eof?, formats reports, opens files
  Processing Module
  Guts of the program
  Finish up Module
  runs at the end of the program, closes the file
  Priming Read
  read the first record, done in Housekeeping
  Case Structures
Compound Selections
If … and/or …
-eliminates more than 1 variable
Not/or Condition (!=….or….) – always answers true
  Case (switch) structure
  suited for decisions for a single variable
  Looping (iteration)
Main loop, Mainline logic- creates a set of instructions and lets us run them over and over again, and end program
  Pretest Loop
  ask question and process
  Posttest Loop
  process then ask question
  For Loop
  lways pretest, finite loop
Finite loop-set to execute a set # of times
  Rolling Total
  totals updated as data input, saves steps
  Hard Edits
  stop users in tracks
  Soft Edits
  suggest may be wrong
-data type
-data range
-presence of data
  Exception handling-
  the bulk of programming is there to validate functioning
  File merging
Merges files that are sorted the same
-new files are added to a “transaction file” and merged nightly
the active module has scope  
  ModuleCall(argument, variable, parameter)
  Argument/parameter list
  Number of variables
Correct datatype
Correct order
  Module coupling
  Loose…data coupling
Control coupling
Pathological coupling
  Functional Cohesion is best
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
  a method that solves the same problem, but with different arguments, and varying order
  Usually public
  Characteristics (height, W, letters, etc. color)
-public and private (generally private)
  Constructor method
  creates instance
  Destructor method
  dissolves instances when object goes out of scope.
  uses a class object, instantiates object
Pair programming
One partner designs the program.
The other codes. 
/ 49

Leave a Comment ({[ getComments().length ]})

Comments ({[ getComments().length ]})


{[ comment.comment ]}

View All {[ getComments().length ]} Comments
Ask a homework question - tutors are online