Program Design And Analysis Flashcards
Software development
Writing a program
Object-oriented program
Uses interacting objects
Program specification
Description of a task
Program design
A written plan, an overview of the solution
Program implementation
The code
Test data
Input to test the program
Program maintenance
Keeping the program working and up to date
Top-down development
Implement main class first, subsidiary classes later
Independent class
Doesn’t use other classes of the program in its code
Bottom-up development
Implement lowest level, independent classes first
Driver class
Used to test other classes; contains main method
Inheritance relationship
Is-a relationship between classes
Composition relationship
Has-a relationship between classes
Inheritance hierarchy
Inheritance relationship shown in a tree like diagram
UML diagram
Tree-like representation of relationship between classes
Data structure
Java construct for storing a data field (e.g., array)
Encapsulation
Combining data fields and methods in a class
Information hiding
Using private to restrict access
Stepwise refinement
Breaking methods into smaller methods
Procedural abstraction
Using helper methods
Algorithm
Step-by-step process that solves a problem
Stub method
Dummy method called by another method being tested
Debugging
Fixing errors
Robust program
Screens out bad inputs
Compile-time error
Usually a syntax error; prevents program from compiling
Syntax error
Bad language usage (e.g., missing brace)
Run-time error
Occurs during execution (e.g., int division by 0)
Exception
Run-time error thrown by Java method
Logic error
Program runs but does the wrong thing